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