@@ -116,7 +116,7 @@ def _create_legacy_target_overview(engine):
116116
117117def _insert_aca_ptc_data (engine ):
118118 with engine .connect () as conn :
119- strata = [1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ]
119+ strata = [1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 ]
120120 for sid in strata :
121121 conn .execute (
122122 text (
@@ -147,6 +147,8 @@ def _insert_aca_ptc_data(engine):
147147 (14 , 8 , "aca_ptc" , ">" , "0" ),
148148 (15 , 8 , "congressional_district_geoid" , "=" , "3702" ),
149149 (16 , 9 , "aca_ptc" , ">" , "0" ),
150+ (17 , 10 , "congressional_district_geoid" , "=" , "601" ),
151+ (18 , 11 , "congressional_district_geoid" , "=" , "602" ),
150152 ]
151153 for cid , sid , var , op , val in constraints :
152154 conn .execute (
@@ -183,6 +185,9 @@ def _insert_aca_ptc_data(engine):
183185 (17 , 9 , "person_count" , 0 , 19743689.0 , 2024 , 1 ),
184186 (18 , 1 , "aca_ptc" , 1 , 999.0 , 2022 , 1 ),
185187 (19 , 1 , "aca_ptc" , 0 , 12345.0 , 2024 , 0 ),
188+ (20 , 10 , "adjusted_gross_income" , 0 , 1000.0 , 2021 , 1 ),
189+ (21 , 10 , "adjusted_gross_income" , 0 , 1500.0 , 2022 , 1 ),
190+ (22 , 11 , "adjusted_gross_income" , 0 , 800.0 , 2022 , 1 ),
186191 ]
187192 for tid , sid , var , reform_id , val , period , active in targets :
188193 conn .execute (
@@ -297,6 +302,13 @@ def test_target_name_adds_expenditure_suffix_for_reforms(self):
297302 )
298303 self .assertEqual (name , "national/salt_deduction_expenditure" )
299304
305+ def test_get_district_agi_targets_uses_requested_db_periods (self ):
306+ b = self ._make_builder (time_period = 2024 )
307+ self .assertEqual (
308+ b .get_district_agi_targets (),
309+ {"601" : 1500.0 , "602" : 800.0 },
310+ )
311+
300312
301313class TestHierarchicalUprating (unittest .TestCase ):
302314 @classmethod
0 commit comments