@@ -150,26 +150,17 @@ def test_general_rule_should_not_evaluate_in_isolation_without_matching_specific
150150 rule_processor ,
151151):
152152 # Person is in COHORT_B
153- cohort = rule_builder .IterationCohortFactory .build (
154- cohort_label = "COHORT_B" ,
155- positive_description = "Eligible"
156- )
153+ cohort = rule_builder .IterationCohortFactory .build (cohort_label = "COHORT_B" , positive_description = "Eligible" )
157154 cohort_results = {}
158155
159156 # Rule 1: cohort-specific to COHORT_A — should be filtered out
160157 rule_specific = rule_builder .IterationRuleFactory .build (
161- priority = 510 ,
162- type = RuleType .suppression ,
163- cohort_label = "COHORT_A" ,
164- name = "SPECIFIC_RULE"
158+ priority = 510 , type = RuleType .suppression , cohort_label = "COHORT_A" , name = "SPECIFIC_RULE"
165159 )
166160
167161 # Rule 2: General rule
168162 rule_general = rule_builder .IterationRuleFactory .build (
169- priority = 510 ,
170- type = RuleType .suppression ,
171- cohort_label = None ,
172- name = "GENERAL_RULE"
163+ priority = 510 , type = RuleType .suppression , cohort_label = None , name = "GENERAL_RULE"
173164 )
174165
175166 suppression_rules = [rule_specific , rule_general ]
@@ -184,7 +175,6 @@ def test_general_rule_should_not_evaluate_in_isolation_without_matching_specific
184175 assert_that (cohort_results ["COHORT_B" ].status , is_ (Status .actionable ))
185176
186177
187-
188178@patch .object (RuleProcessor , "evaluate_rules_priority_group" )
189179@patch .object (RuleProcessor , "get_exclusion_rules" , side_effect = lambda cohort , rules_to_filter : rules_to_filter ) # noqa: ARG005
190180def test_is_eligible_by_filter_rules_eligible (
@@ -305,8 +295,8 @@ def test_evaluate_suppression_rules_stops_on_rule_stop(
305295 assert_that (cohort_results ["COHORT_A" ].status , is_ (Status .not_actionable ))
306296 assert_that (cohort_results ["COHORT_A" ].reasons , is_ ([mock_reason_p1 ]))
307297 assert_that (cohort_results ["COHORT_A" ].audit_rules , is_ ([mock_reason_p1 ]))
308- mock_evaluate_rules_priority_group .assert_called_once ( )
309- mock_get_exclusion_rules .assert_called_once_with (cohort , suppression_rules )
298+ assert_that ( mock_evaluate_rules_priority_group .call_count , is_ ( 1 ) )
299+ mock_get_exclusion_rules .assert_called_once_with (cohort , [ suppression_rule_p1 ] )
310300
311301
312302@patch .object (RuleProcessor , "evaluate_rules_priority_group" )
@@ -338,7 +328,7 @@ def test_evaluate_suppression_rules_does_not_stop_on_rule_stop_when_status_is_ac
338328 assert_that (cohort_results ["COHORT_A" ].audit_rules , is_ ([mock_reason_p2 ]))
339329
340330 assert_that (mock_evaluate_rules_priority_group .call_count , is_ (2 ))
341- assert_that (mock_get_exclusion_rules .call_count , is_ (1 ))
331+ assert_that (mock_get_exclusion_rules .call_count , is_ (2 ))
342332
343333
344334def test_is_base_eligible (mock_person_data_reader ):
0 commit comments