Coverage for benefits/core/context/agency.py: 100%
15 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-03-13 23:09 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-03-13 23:09 +0000
1from dataclasses import dataclass, asdict
3from django.db import models
4from django.utils.translation import gettext_lazy as _
7class AgencySlug(models.TextChoices):
8 # raw value, display value
9 CST = "cst", "cst"
10 MST = "mst", "mst"
11 NEVCO = "nevco", "nevco"
12 SACRT = "sacrt", "sacrt"
13 SBMTD = "sbmtd", "sbmtd"
16@dataclass
17class AgencyIndex:
18 headline: str
20 def dict(self):
21 return asdict(self)
24agency_index = {
25 AgencySlug.CST.value: AgencyIndex(headline=_("Get a reduced fare on CST public transportation when you tap to ride")),
26 AgencySlug.MST.value: AgencyIndex(headline=_("Get a reduced fare on MST public transportation when you tap to ride")),
27 AgencySlug.NEVCO.value: AgencyIndex(
28 headline=_("Get a reduced fare on Nevada County Connects public transportation when you tap to ride")
29 ),
30 AgencySlug.SACRT.value: AgencyIndex(headline=_("Get a reduced fare on SacRT buses when you tap to ride")),
31 AgencySlug.SBMTD.value: AgencyIndex(headline=_("Get a reduced fare on Santa Barbara MTD buses when you tap to ride")),
32}