@@ -735,14 +735,14 @@ def test_build_condition_results_single_condition_single_cohort_not_eligible_wit
735735
736736 def test_build_condition_results_single_condition_multiple_cohorts_same_cohort_code_same_status (self ):
737737 reason_1 = Reason (
738- RuleType .filter ,
738+ RuleType .suppression ,
739739 eligibility_status .RuleName ("Filter Rule 1" ),
740740 RulePriority ("1" ),
741741 RuleDescription ("Filter Rule Description 2" ),
742742 matcher_matched = True ,
743743 )
744744 reason_2 = Reason (
745- RuleType .filter ,
745+ RuleType .suppression ,
746746 eligibility_status .RuleName ("Filter Rule 2" ),
747747 RulePriority ("2" ),
748748 RuleDescription ("Filter Rule Description 2" ),
@@ -779,14 +779,14 @@ def test_build_condition_results_single_condition_multiple_cohorts_same_cohort_c
779779
780780 def test_build_condition_results_multiple_cohorts_different_cohort_code_same_status (self ):
781781 reason_1 = Reason (
782- RuleType .filter ,
782+ RuleType .suppression ,
783783 eligibility_status .RuleName ("Filter Rule 1" ),
784784 RulePriority ("1" ),
785785 RuleDescription ("Filter Rule Description 2" ),
786786 matcher_matched = True ,
787787 )
788788 reason_2 = Reason (
789- RuleType .filter ,
789+ RuleType .suppression ,
790790 eligibility_status .RuleName ("Filter Rule 2" ),
791791 RulePriority ("2" ),
792792 RuleDescription ("Filter Rule Description 2" ),
@@ -820,14 +820,14 @@ def test_build_condition_results_multiple_cohorts_different_cohort_code_same_sta
820820
821821 def test_build_condition_results_cohorts_status_not_matching_iteration_status (self ):
822822 reason_1 = Reason (
823- RuleType .filter ,
823+ RuleType .suppression ,
824824 eligibility_status .RuleName ("Filter Rule 1" ),
825825 RulePriority ("1" ),
826826 RuleDescription ("Matching" ),
827827 matcher_matched = True ,
828828 )
829829 reason_2 = Reason (
830- RuleType .filter ,
830+ RuleType .suppression ,
831831 eligibility_status .RuleName ("Filter Rule 2" ),
832832 RulePriority ("2" ),
833833 RuleDescription ("Not matching" ),
@@ -849,7 +849,7 @@ def test_build_condition_results_cohorts_status_not_matching_iteration_status(se
849849 @pytest .mark .parametrize (
850850 ("reason_2" , "expected_reasons" ),
851851 [
852- # Same rule name and priority, different description
852+ # Same rule name , type, and priority, different description
853853 (
854854 Reason (
855855 RuleType .suppression ,
@@ -868,7 +868,7 @@ def test_build_condition_results_cohorts_status_not_matching_iteration_status(se
868868 )
869869 ],
870870 ),
871- # Different rule name, same priority
871+ # Different rule name, same type, same priority
872872 (
873873 Reason (
874874 RuleType .suppression ,
@@ -887,7 +887,7 @@ def test_build_condition_results_cohorts_status_not_matching_iteration_status(se
887887 )
888888 ],
889889 ),
890- # Same rule name, different priority
890+ # Same rule name, same type, different priority
891891 (
892892 Reason (
893893 RuleType .suppression ,
@@ -913,6 +913,32 @@ def test_build_condition_results_cohorts_status_not_matching_iteration_status(se
913913 ),
914914 ],
915915 ),
916+ # Same rule name, same priority, different type
917+ (
918+ Reason (
919+ RuleType .filter ,
920+ eligibility_status .RuleName ("Supress Rule 1" ),
921+ RulePriority ("2" ),
922+ RuleDescription ("Matching" ),
923+ matcher_matched = True ,
924+ ),
925+ [ # Both reasons expected
926+ Reason (
927+ RuleType .suppression ,
928+ eligibility_status .RuleName ("Supress Rule 1" ),
929+ RulePriority ("1" ),
930+ RuleDescription ("Not matching" ),
931+ matcher_matched = True ,
932+ ),
933+ Reason (
934+ RuleType .filter ,
935+ eligibility_status .RuleName ("Supress Rule 1" ),
936+ RulePriority ("2" ),
937+ RuleDescription ("Matching" ),
938+ matcher_matched = True ,
939+ ),
940+ ],
941+ ),
916942 ],
917943 )
918944 def test_build_condition_results_grouping_reasons (self , reason_2 , expected_reasons ):
0 commit comments