Skip to content

Commit 1cd667c

Browse files
[ERSSUP-89806]-[]-[Minor IT fixes]-[JW]
1 parent 3979743 commit 1cd667c

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

tests/integration/test_app_restricted.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff 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

tests/integration/test_headers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)