@@ -841,11 +841,24 @@ def test_rules_stop_behavior(rule_stop: str | None, expected_status: Status, tes
841841 }
842842
843843 # Build rule variations
844- rule_variants = [
845- {"Type" : "S" , "Priority" : 10 , "RuleStop" : rule_stop },
846- {"Type" : "S" , "Priority" : 10 },
847- {"Type" : "F" , "Priority" : 15 },
848- ]
844+ s_rule_priority_10_with_rule_stop_true_data = simple_age_data .copy ()
845+ s_rule_priority_10_with_rule_stop_true_data .update ({"Type" : "S" , "Priority" : 9 , "RuleStop" : rule_stop })
846+
847+ s_rule_priority_10 = simple_age_data .copy ()
848+ s_rule_priority_10 .update (
849+ {
850+ "Type" : "S" ,
851+ "Priority" : 10 ,
852+ }
853+ )
854+
855+ f_rule_priority_15 = simple_age_data .copy ()
856+ f_rule_priority_15 .update (
857+ {
858+ "Type" : "F" ,
859+ "Priority" : 15 ,
860+ }
861+ )
849862
850863 # Build campaign configuration
851864 campaign_config = rule_builder .CampaignConfigFactory .build (
@@ -856,10 +869,14 @@ def test_rules_stop_behavior(rule_stop: str | None, expected_status: Status, tes
856869 )
857870 ],
858871 )
859- for variant in rule_variants :
860- campaign_config .iterations [0 ].iteration_rules .append (
861- IterationRule .model_validate ({** simple_age_data , ** variant })
862- )
872+
873+ campaign_config .iterations [0 ].iteration_rules .extend (
874+ [
875+ IterationRule .model_validate (s_rule_priority_10_with_rule_stop_true_data ),
876+ IterationRule .model_validate (s_rule_priority_10 ),
877+ IterationRule .model_validate (f_rule_priority_15 ),
878+ ]
879+ )
863880
864881 calculator = EligibilityCalculator (person_rows , [campaign_config ])
865882
0 commit comments