File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,7 +321,27 @@ def test_given_nhs_number_in_path_does_not_match_with_nhs_number_in_headers_resu
321321 )
322322
323323
324- def test_given_nhs_number_not_present_in_headers_results_in_error_response (
324+ def test_given_nhs_number_not_present_in_headers_results_in_valid_for_application_restricted_users (
325+ lambda_client : BaseClient , # noqa:ARG001
326+ persisted_person : NHSNumber ,
327+ campaign_config : CampaignConfig , # noqa:ARG001
328+ api_gateway_endpoint : URL ,
329+ ):
330+ # Given
331+ # When
332+ invoke_url = f"{ api_gateway_endpoint } /patient-check/{ persisted_person } "
333+ response = httpx .get (
334+ invoke_url ,
335+ timeout = 10 ,
336+ )
337+
338+ assert_that (
339+ response ,
340+ is_response ().with_status_code (HTTPStatus .OK ).and_body (is_json_that (has_key ("processedSuggestions" ))),
341+ )
342+
343+
344+ def test_given_nhs_number_key_present_in_headers_have_no_value_results_in_error_response (
325345 lambda_client : BaseClient , # noqa:ARG001
326346 persisted_person : NHSNumber ,
327347 campaign_config : CampaignConfig , # noqa:ARG001
@@ -340,7 +360,7 @@ def test_given_nhs_number_not_present_in_headers_results_in_error_response(
340360 response ,
341361 is_response ()
342362 .with_status_code (HTTPStatus .FORBIDDEN )
343- .with_headers (has_entries ({"Content-Type" : "application/fhir+json" }))
363+ .with_headers (has_entries ({"Content-Type" : "application/fhir+json" , "nhs-login-nhs-number" : "123" }))
344364 .and_body (
345365 is_json_that (
346366 has_entries (
You can’t perform that action at this time.
0 commit comments