Skip to content

Commit

Permalink
Removed tests with two decorators which appeared to be causing Azure …
Browse files Browse the repository at this point in the history
…DevOps build pipeline to fail
  • Loading branch information
chris-young-12-nhs committed Feb 13, 2024
1 parent 2519437 commit a3bfe22
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions tests/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,4 @@ def test_wait_for_status(nhsd_apim_proxy_url, status_endpoint_auth_headers):
@pytest.mark.nhsd_apim_authorization({"access": "application", "level": "level0"})
def test_app_level0(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
assert resp.status_code == 401 # unauthorized


@pytest.mark.skip(reason="TBC: Are we supporting Application level 3 access to the API?")
@pytest.mark.nhsd_apim_authorization({"access": "application", "level": "level3"})
def test_app_level3(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
assert resp.status_code == 200


@pytest.mark.skip(reason="Requires API key to be shared with proxy and decision on endpoint and user to use")
@pytest.mark.nhsd_apim_authorization(
{
"access": "patient",
"level": "P9",
"login_form": {"username": "TBC"}
}
)
def test_nhs_login_p9(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
assert resp.status_code == 200
assert resp.status_code == 401 # unauthorized

0 comments on commit a3bfe22

Please sign in to comment.