Fix issues with org_user_status global context and logo_clickable profile context

This commit is contained in:
Rachid Mrad 2024-07-08 18:57:46 -04:00
parent a7c29f4d21
commit dcb63d1947
No known key found for this signature in database
11 changed files with 132 additions and 127 deletions

View file

@ -429,6 +429,10 @@ class ViewsTest(TestCase):
# Create a mock request
request = self.factory.get("/some-url")
request.session = {"acr_value": ""}
# Mock user and its attributes
mock_user = MagicMock()
mock_user.is_authenticated = True
request.user = mock_user
# Ensure that the CLIENT instance used in login_callback is the mock
# patch _requires_step_up_auth to return False
with patch("djangooidc.views._requires_step_up_auth", return_value=False), patch(