-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26d6e18
commit 6c02aba
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,10 @@ def test_justice_auth_feature_flag_disabled_for_normal_user(self, users, client) | |
@patch("controlpanel.frontend.views.auth.oauth") | ||
def test_success(self, oauth, client, users): | ||
oauth.azure.authorize_access_token.return_value = { | ||
"userinfo": {"email": "[email protected]"}, | ||
"userinfo": { | ||
"email": "[email protected]", | ||
"oid": "12345678" | ||
}, | ||
} | ||
user = users["normal_user"] | ||
assert user.justice_email is None | ||
|
@@ -36,6 +39,7 @@ def test_success(self, oauth, client, users): | |
|
||
user.refresh_from_db() | ||
assert user.justice_email == "[email protected]" | ||
assert user.azure_oid == "12345678" | ||
assertContains(response, "Successfully authenticated with your email [email protected]") | ||
|
||
@patch("controlpanel.frontend.views.auth.oauth") | ||
|