Coverage for benefits/eligibility/context/agency.py: 91%

9 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-22 21:13 +0000

1from benefits.core.context import AgencySlug, formatted_gettext_lazy as _ 

2 

3 

4class EligibilityIndex: 

5 def __init__(self, form_text): 

6 if not isinstance(form_text, list): 6 ↛ 9line 6 didn't jump to line 9 because the condition on line 6 was always true

7 form_text = [form_text] 

8 

9 self.form_text = form_text 

10 

11 def dict(self): 

12 return dict(form_text=self.form_text) 

13 

14 

15eligibility_index = { 

16 AgencySlug.CST.value: EligibilityIndex( 

17 form_text=_( 

18 "Cal-ITP doesn’t save any of your information. " 

19 "All CST transit benefits reduce fares by 50%% for bus service on fixed routes.".replace("%%", "%") 

20 ) 

21 ), 

22 AgencySlug.MST.value: EligibilityIndex( 

23 form_text=_( 

24 "Cal-ITP doesn’t save any of your information. " 

25 "All MST transit benefits reduce fares by 50%% for bus service on fixed routes.".replace("%%", "%") 

26 ) 

27 ), 

28 AgencySlug.NEVCO.value: EligibilityIndex( 

29 form_text=_( 

30 "Cal-ITP doesn’t save any of your information. " 

31 "All Nevada County Connects transit benefits reduce fares by 50%% for bus service on fixed routes.".replace( 

32 "%%", "%" 

33 ) 

34 ) 

35 ), 

36 AgencySlug.SACRT.value: EligibilityIndex( 

37 form_text=_( 

38 "Cal-ITP doesn’t save any of your information. " 

39 "All SacRT transit benefits reduce fares by 50%% for bus service on fixed routes.".replace("%%", "%") 

40 ) 

41 ), 

42 AgencySlug.SBMTD.value: EligibilityIndex( 

43 form_text=_( 

44 "Cal-ITP doesn’t save any of your information. " 

45 "All SBMTD transit benefits reduce fares by 50%% for bus service on fixed routes.".replace("%%", "%") 

46 ) 

47 ), 

48}