Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion backend/shared/shared/azure_adfs/tests/test_adfs_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,16 @@ def test_adfs_callback(
assert "_auth_user_id" in client.session


# FIXME: This test does not work if NEXT_PUBLIC_ENABLE_SUOMIF=True
# when bringing up the backend. Overriding this setting here
# does not help, because there's conditional logic being done
# based on the setting's value elsewhere that does not get
# rerun when changing the setting in this test.
@pytest.mark.django_db
@override_settings(
NEXT_PUBLIC_MOCK_FLAG=False, ADFS_LOGIN_REDIRECT_URL="http://example.com"
NEXT_PUBLIC_MOCK_FLAG=False,
ADFS_LOGIN_REDIRECT_URL="http://example.com",
NEXT_PUBLIC_ENABLE_SUOMIFI=False,
)
@pytest.mark.parametrize(
"original_redirect_url",
Expand Down
1 change: 1 addition & 0 deletions backend/shared/shared/oidc/tests/test_eauth_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def test_get_organization_roles(session_request, requests_mock):
EAUTHORIZATIONS_CLIENT_ID="test",
EAUTHORIZATIONS_CLIENT_SECRET="test",
NEXT_PUBLIC_MOCK_FLAG=False,
NEXT_PUBLIC_ENABLE_SUOMIFI=False,
)
def test_eauth_authentication_init_view(requests_mock, user_client, user):
register_user_info = {
Expand Down
3 changes: 3 additions & 0 deletions backend/shared/shared/oidc/tests/test_oidc_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def test_logout_callback_view(requests_mock, user_client, user):
@override_settings(
OIDC_OP_USER_ENDPOINT="http://example.com/userinfo/",
NEXT_PUBLIC_MOCK_FLAG=False,
NEXT_PUBLIC_ENABLE_SUOMIFI=False,
)
def test_userinfo_view(requests_mock, user_client, user):
userinfo = {
Expand Down Expand Up @@ -105,6 +106,7 @@ def test_userinfo_view(requests_mock, user_client, user):
@override_settings(
OIDC_OP_USER_ENDPOINT="http://example.com/userinfo/",
NEXT_PUBLIC_MOCK_FLAG=False,
NEXT_PUBLIC_ENABLE_SUOMIFI=False,
)
def test_userinfo_view_without_oidc_info(user_client):
session = user_client.session
Expand All @@ -127,6 +129,7 @@ def test_userinfo_view_without_oidc_info(user_client):
@override_settings(
OIDC_OP_USER_ENDPOINT="http://example.com/userinfo/",
NEXT_PUBLIC_MOCK_FLAG=False,
NEXT_PUBLIC_ENABLE_SUOMIFI=False,
)
def test_userinfo_view_with_userinfo_returning_401(requests_mock, user_client, user):
matcher = re.compile(re.escape(settings.OIDC_OP_USER_ENDPOINT))
Expand Down
Loading