Skip to content

Commit f6bfc54

Browse files
fixes broken test
1 parent 2486970 commit f6bfc54

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def asid(is_mocked_environment):
8383
def apim_app_flow_vars(allowListodsCode=None):
8484
if allowListodsCode is not None:
8585
print(f"Using allowListodsCode: {allowListodsCode}")
86-
return {"ers": {"allowListodsCode": allowListodsCode}}
86+
return {"ers": {"allowListodsCode": str(allowListodsCode)}}
8787

8888

8989
@pytest.fixture(scope="session")

tests/integration/test_user_restricted.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ class TestUserRestricted:
3333
@pytest.mark.asyncio
3434
@pytest.mark.parametrize(
3535
"endpoint_url, is_fhir_4",
36-
[("", False), ("/FHIR/R4/", True), ("/FHIR/STU3/", False)],
36+
"apim_app_flow_vars",
37+
[
38+
("", False, [referring_clinician.org_code]),
39+
("/FHIR/R4/", True, [referring_clinician.org_code]),
40+
("/FHIR/STU3/", False, [referring_clinician.org_code]),
41+
],
3742
)
3843
async def test_user_restricted_valid_ods_code(
3944
self,
@@ -42,11 +47,10 @@ async def test_user_restricted_valid_ods_code(
4247
endpoint_url,
4348
is_fhir_4,
4449
service_url,
50+
apim_app_flow_vars,
4551
update_user_restricted_product,
4652
):
47-
access_code = await authenticate_user(
48-
referring_clinician, [referring_clinician.org_code]
49-
)
53+
access_code = await authenticate_user(referring_clinician)
5054

5155
client_request_headers = {
5256
_HEADER_ECHO: "", # enable echo target

0 commit comments

Comments
 (0)