@@ -83,9 +83,10 @@ def test_not_base_eligible(
8383 client : FlaskClient ,
8484 persisted_person_no_cohorts : NHSNumber ,
8585 campaign_config : CampaignConfig , # noqa: ARG002
86+ consumer_mapping : ConsumerMapping , # noqa: ARG002
8687 ):
8788 # Given
88- headers = {"nhs-login-nhs-number" : str (persisted_person_no_cohorts )}
89+ headers = {"nhs-login-nhs-number" : str (persisted_person_no_cohorts ), CONSUMER_ID : "23-mic7heal-jor6don" }
8990
9091 # When
9192 response = client .get (f"/patient-check/{ persisted_person_no_cohorts } ?includeActions=Y" , headers = headers )
@@ -127,9 +128,10 @@ def test_not_eligible_by_rule(
127128 client : FlaskClient ,
128129 persisted_person_pc_sw19 : NHSNumber ,
129130 campaign_config : CampaignConfig , # noqa: ARG002
131+ consumer_mapping : ConsumerMapping , # noqa: ARG002
130132 ):
131133 # Given
132- headers = {"nhs-login-nhs-number" : str (persisted_person_pc_sw19 )}
134+ headers = {"nhs-login-nhs-number" : str (persisted_person_pc_sw19 ), CONSUMER_ID : "23-mic7heal-jor6don" }
133135
134136 # When
135137 response = client .get (f"/patient-check/{ persisted_person_pc_sw19 } ?includeActions=Y" , headers = headers )
@@ -171,9 +173,10 @@ def test_not_actionable_and_check_response_when_no_rule_code_given(
171173 client : FlaskClient ,
172174 persisted_person : NHSNumber ,
173175 campaign_config : CampaignConfig , # noqa: ARG002
176+ consumer_mapping : ConsumerMapping , # noqa: ARG002
174177 ):
175178 # Given
176- headers = {"nhs-login-nhs-number" : str (persisted_person )}
179+ headers = {"nhs-login-nhs-number" : str (persisted_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
177180
178181 # When
179182 response = client .get (f"/patient-check/{ persisted_person } ?includeActions=Y" , headers = headers )
@@ -221,8 +224,9 @@ def test_actionable(
221224 client : FlaskClient ,
222225 persisted_77yo_person : NHSNumber ,
223226 campaign_config : CampaignConfig , # noqa: ARG002
227+ consumer_mapping : ConsumerMapping , # noqa: ARG002
224228 ):
225- headers = {"nhs-login-nhs-number" : str (persisted_77yo_person )}
229+ headers = {"nhs-login-nhs-number" : str (persisted_77yo_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
226230
227231 # When
228232 response = client .get (f"/patient-check/{ persisted_77yo_person } ?includeActions=Y" , headers = headers )
@@ -272,9 +276,10 @@ def test_actionable_with_and_rule(
272276 client : FlaskClient ,
273277 persisted_person : NHSNumber ,
274278 campaign_config_with_and_rule : CampaignConfig , # noqa: ARG002
279+ consumer_mapping : ConsumerMapping , # noqa: ARG002
275280 ):
276281 # Given
277- headers = {"nhs-login-nhs-number" : str (persisted_person )}
282+ headers = {"nhs-login-nhs-number" : str (persisted_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
278283
279284 # When
280285 response = client .get (f"/patient-check/{ persisted_person } ?includeActions=Y" , headers = headers )
@@ -326,9 +331,10 @@ def test_not_eligible_by_rule_when_only_virtual_cohort_is_present(
326331 client : FlaskClient ,
327332 persisted_person_pc_sw19 : NHSNumber ,
328333 campaign_config_with_virtual_cohort : CampaignConfig , # noqa: ARG002
334+ consumer_mapping : ConsumerMapping , # noqa: ARG002
329335 ):
330336 # Given
331- headers = {"nhs-login-nhs-number" : str (persisted_person_pc_sw19 )}
337+ headers = {"nhs-login-nhs-number" : str (persisted_person_pc_sw19 ), CONSUMER_ID : "23-mic7heal-jor6don" }
332338
333339 # When
334340 response = client .get (f"/patient-check/{ persisted_person_pc_sw19 } ?includeActions=Y" , headers = headers )
@@ -370,9 +376,10 @@ def test_not_actionable_when_only_virtual_cohort_is_present(
370376 client : FlaskClient ,
371377 persisted_person : NHSNumber ,
372378 campaign_config_with_virtual_cohort : CampaignConfig , # noqa: ARG002
379+ consumer_mapping : ConsumerMapping , # noqa: ARG002
373380 ):
374381 # Given
375- headers = {"nhs-login-nhs-number" : str (persisted_person )}
382+ headers = {"nhs-login-nhs-number" : str (persisted_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
376383
377384 # When
378385 response = client .get (f"/patient-check/{ persisted_person } ?includeActions=Y" , headers = headers )
@@ -420,9 +427,10 @@ def test_actionable_when_only_virtual_cohort_is_present(
420427 client : FlaskClient ,
421428 persisted_77yo_person : NHSNumber ,
422429 campaign_config_with_virtual_cohort : CampaignConfig , # noqa: ARG002
430+ consumer_mapping : ConsumerMapping , # noqa: ARG002
423431 ):
424432 # Given
425- headers = {"nhs-login-nhs-number" : str (persisted_77yo_person )}
433+ headers = {"nhs-login-nhs-number" : str (persisted_77yo_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
426434
427435 # When
428436 response = client .get (f"/patient-check/{ persisted_77yo_person } ?includeActions=Y" , headers = headers )
@@ -474,9 +482,10 @@ def test_not_base_eligible(
474482 client : FlaskClient ,
475483 persisted_person_no_cohorts : NHSNumber ,
476484 campaign_config_with_missing_descriptions_missing_rule_text : CampaignConfig , # noqa: ARG002
485+ consumer_mapping : ConsumerMapping , # noqa: ARG002
477486 ):
478487 # Given
479- headers = {"nhs-login-nhs-number" : str (persisted_person_no_cohorts )}
488+ headers = {"nhs-login-nhs-number" : str (persisted_person_no_cohorts ), CONSUMER_ID : "23-mic7heal-jor6don" }
480489
481490 # When
482491 response = client .get (f"/patient-check/{ persisted_person_no_cohorts } ?includeActions=Y" , headers = headers )
@@ -512,9 +521,10 @@ def test_not_eligible_by_rule(
512521 client : FlaskClient ,
513522 persisted_person_pc_sw19 : NHSNumber ,
514523 campaign_config_with_missing_descriptions_missing_rule_text : CampaignConfig , # noqa: ARG002
524+ consumer_mapping : ConsumerMapping , # noqa: ARG002
515525 ):
516526 # Given
517- headers = {"nhs-login-nhs-number" : str (persisted_person_pc_sw19 )}
527+ headers = {"nhs-login-nhs-number" : str (persisted_person_pc_sw19 ), CONSUMER_ID : "23-mic7heal-jor6don" }
518528
519529 # When
520530 response = client .get (f"/patient-check/{ persisted_person_pc_sw19 } ?includeActions=Y" , headers = headers )
@@ -550,9 +560,10 @@ def test_not_actionable(
550560 client : FlaskClient ,
551561 persisted_person : NHSNumber ,
552562 campaign_config_with_missing_descriptions_missing_rule_text : CampaignConfig , # noqa: ARG002
563+ consumer_mapping : ConsumerMapping , # noqa: ARG002
553564 ):
554565 # Given
555- headers = {"nhs-login-nhs-number" : str (persisted_person )}
566+ headers = {"nhs-login-nhs-number" : str (persisted_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
556567
557568 # When
558569 response = client .get (f"/patient-check/{ persisted_person } ?includeActions=Y" , headers = headers )
@@ -594,9 +605,10 @@ def test_actionable(
594605 client : FlaskClient ,
595606 persisted_77yo_person : NHSNumber ,
596607 campaign_config_with_missing_descriptions_missing_rule_text : CampaignConfig , # noqa: ARG002
608+ consumer_mapping : ConsumerMapping , # noqa: ARG002
597609 ):
598610 # Given
599- headers = {"nhs-login-nhs-number" : str (persisted_77yo_person )}
611+ headers = {"nhs-login-nhs-number" : str (persisted_77yo_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
600612
601613 # When
602614 response = client .get (f"/patient-check/{ persisted_77yo_person } ?includeActions=Y" , headers = headers )
@@ -640,9 +652,10 @@ def test_actionable_no_actions(
640652 client : FlaskClient ,
641653 persisted_77yo_person : NHSNumber ,
642654 campaign_config_with_missing_descriptions_missing_rule_text : CampaignConfig , # noqa: ARG002
655+ consumer_mapping : ConsumerMapping , # noqa: ARG002
643656 ):
644657 # Given
645- headers = {"nhs-login-nhs-number" : str (persisted_77yo_person )}
658+ headers = {"nhs-login-nhs-number" : str (persisted_77yo_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
646659
647660 # When
648661 response = client .get (f"/patient-check/{ persisted_77yo_person } ?includeActions=N" , headers = headers )
@@ -714,9 +727,10 @@ def test_not_actionable_and_check_response_when_rule_mapper_is_absent_but_rule_c
714727 client : FlaskClient ,
715728 persisted_person : NHSNumber ,
716729 campaign_config_with_rules_having_rule_code : CampaignConfig , # noqa: ARG002
730+ consumer_mapping : ConsumerMapping , # noqa: ARG002
717731 ):
718732 # Given
719- headers = {"nhs-login-nhs-number" : str (persisted_person )}
733+ headers = {"nhs-login-nhs-number" : str (persisted_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
720734
721735 # When
722736 response = client .get (f"/patient-check/{ persisted_person } ?includeActions=Y" , headers = headers )
@@ -764,9 +778,10 @@ def test_not_actionable_and_check_response_when_rule_mapper_is_given(
764778 client : FlaskClient ,
765779 persisted_person : NHSNumber ,
766780 campaign_config_with_rules_having_rule_mapper : CampaignConfig , # noqa: ARG002
781+ consumer_mapping : ConsumerMapping , # noqa: ARG002
767782 ):
768783 # Given
769- headers = {"nhs-login-nhs-number" : str (persisted_person )}
784+ headers = {"nhs-login-nhs-number" : str (persisted_person ), CONSUMER_ID : "23-mic7heal-jor6don" }
770785
771786 # When
772787 response = client .get (f"/patient-check/{ persisted_person } ?includeActions=Y" , headers = headers )
0 commit comments