Coverage for benefits/core/context/agency.py: 100%
16 statements
« prev ^ index » next coverage.py v7.10.2, created at 2025-08-08 16:26 +0000
« prev ^ index » next coverage.py v7.10.2, created at 2025-08-08 16:26 +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"
14 VCTC = "vctc", "vctc"
17@dataclass
18class AgencyIndex:
19 headline: str
21 def dict(self):
22 return asdict(self)
25agency_index = {
26 AgencySlug.CST.value: AgencyIndex(headline=_("Get a reduced fare on CST public transportation when you tap to ride")),
27 AgencySlug.MST.value: AgencyIndex(headline=_("Get a reduced fare on MST public transportation when you tap to ride")),
28 AgencySlug.NEVCO.value: AgencyIndex(
29 headline=_("Get a reduced fare on Nevada County Connects public transportation when you tap to ride")
30 ),
31 AgencySlug.SACRT.value: AgencyIndex(headline=_("Get a reduced fare on SacRT buses when you tap to ride")),
32 AgencySlug.SBMTD.value: AgencyIndex(headline=_("Get a reduced fare on Santa Barbara MTD buses when you tap to ride")),
33 AgencySlug.VCTC.value: AgencyIndex(
34 headline=_("Get a reduced fare on Ventura County Transportation Commission buses when you tap to ride")
35 ),
36}