testing test failure in pipeline

This commit is contained in:
David Kennedy 2023-12-08 10:13:38 -05:00
parent 02f5c81a58
commit 5be972e068
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B

View file

@ -201,13 +201,10 @@ class ViewsTestUnpatched(TestCase):
def test_login_callback_requires_step_up_auth(self):
"""Walk through login_callback when requires_step_up_auth returns True
and assert that create_authn_request is returned."""
and assert that create_authn_request is called."""
with patch("djangooidc.views.requires_step_up_auth", return_value=True), patch(
"djangooidc.views.Client.callback", return_value=self.user_info
), patch("djangooidc.views.Client.create_authn_request", side_effect=self.say_hi):
), patch("djangooidc.views.Client.create_authn_request", side_effect=self.say_hi) as mock_create_authn_request:
response = self.client.get(reverse("openid_login_callback"))
# assert
self.assertEqual(response.status_code, 200)
self.assertContains(response, "Hi")
mock_create_authn_request.assert_called()