Skip to content

Commit ba8f7b4

Browse files
test cohort_label for person in multiple cohorts
1 parent cc45c55 commit ba8f7b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/unit/services/calculators/test_eligibility_calculator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -765,20 +765,20 @@ def test_status_on_cohort_attribute_level(faker: Faker):
765765

766766

767767
@pytest.mark.parametrize(
768-
("cohort", "expected_status", "test_comment"),
768+
("person_cohorts", "cohort", "expected_status", "test_comment"),
769769
[
770-
("cohort1", Status.not_actionable, "matches the cohort label"),
771-
("cohort2", Status.actionable, "doesn't match the cohort label"),
770+
(["cohort1", "cohort2"], "cohort1", Status.not_actionable, "matches the cohort label"),
771+
(["cohort2", "cohort3"], "cohort1", Status.actionable, "doesn't match the cohort label"),
772772
],
773773
)
774774
def test_status_if_iteration_rules_contains_cohort_label(
775-
cohort: str, expected_status: Status, test_comment: str, faker: Faker
775+
person_cohorts, cohort: str, expected_status: Status, test_comment: str, faker: Faker
776776
):
777777
# Given
778778
nhs_number = NHSNumber(faker.nhs_number())
779779
date_of_birth = DateOfBirth(faker.date_of_birth(minimum_age=66, maximum_age=74))
780780

781-
person_rows = person_rows_builder(nhs_number, date_of_birth=date_of_birth, cohorts=["cohort1"])
781+
person_rows = person_rows_builder(nhs_number, date_of_birth=date_of_birth, cohorts=person_cohorts)
782782
campaign_configs = [
783783
rule_builder.CampaignConfigFactory.build(
784784
target="RSV",

0 commit comments

Comments
 (0)