File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,20 @@ async def test_authorised_application_not_supported_for_user_restricted(
4646 f"{ service_url } { _SPECIALTY_REF_DATA_URL } " , headers = client_request_headers
4747 )
4848
49- assert_error_response_with_body (response , _EXPECTED_CORRELATION_ID , 403 )
49+ assert response .status_code == 403 , (
50+ "Expected 403 response when calling the endpoint. But instead received a "
51+ + response .status_code
52+ )
53+
54+ assert response .status_code == None
55+
56+ assert (
57+ response .headers [RenamedHeader .CORRELATION_ID .original ]
58+ == _EXPECTED_CORRELATION_ID
59+ )
60+
61+ for renamed_header in RenamedHeader :
62+ assert renamed_header .renamed not in response .headers
5063
5164 def test_authorised_application_supported_for_app_restricted (
5265 self , app_restricted_access_code , service_url
Original file line number Diff line number Diff line change @@ -104,9 +104,9 @@ async def test_headers_on_echo_target_with_app_restricted_business_function(
104104 + str (response .status_code )
105105 )
106106
107- response_body = response .text ()
108- assert response_body == "Forbidden" , (
109- "Expected the text 'Forbidden' to be returned in the body of the response when attempting to call the endpoint, but instead received "
107+ response_body = response .text
108+ assert response_body == None (
109+ "Expected no response body of the response when attempting to call the endpoint, but instead received "
110110 + response_body
111111 )
112112
You can’t perform that action at this time.
0 commit comments