Skip to content

Commit

Permalink
Merge pull request #3501 from open-formulieren/chore/fix-locally-fail…
Browse files Browse the repository at this point in the history
…ing-digid-eherkenning-tests

💚 Fix tests failing with dev-settings
  • Loading branch information
sergei-maertens authored Sep 25, 2023
2 parents a9835b3 + fa7851d commit 4983cee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
SIGNICAT_BROKER_BASE = furl("https://maykin.pre.ie01.signicat.pro/broker")


@patch(
"openforms.submissions.tokens.submission_resume_token_generator.secret", new="dummy"
)
@patch(
"onelogin.saml2.authn_request.OneLogin_Saml2_Utils.generate_unique_id",
lambda *_, **__: "ONELOGIN_123456",
Expand Down Expand Up @@ -484,6 +487,7 @@ def test_raising_loa_requirements_fails_in_flight_authentications(self):
clear_caches()

acs_response = self.client.get(acs_url.url, follow=True)
assert acs_response.status_code == 200
# we are not not logged in
self.assertNotIn(FORM_AUTH_SESSION_KEY, self.client.session)
# and are redirected back to the broker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
SELECT_EHERKENNING_SIM = SIGNICAT_BROKER_BASE / "authn/simulator/selection/eh"


@patch(
"openforms.submissions.tokens.submission_resume_token_generator.secret", new="dummy"
)
@patch(
"onelogin.saml2.authn_request.OneLogin_Saml2_Utils.generate_unique_id",
lambda *_, **__: "ONELOGIN_123456",
Expand Down Expand Up @@ -207,6 +210,7 @@ def test_login_with_a_high_loa_succeeds(self):
# prep the URL for Django test client consumption
acs_url.remove(netloc=True, scheme=True)
acs_response = self.client.get(acs_url.url, follow=True)
assert acs_response.status_code == 200

# we are logged in
self.assertIn(FORM_AUTH_SESSION_KEY, self.client.session)
Expand Down

0 comments on commit 4983cee

Please sign in to comment.