-
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.
Lower email before checking justice domain (#1439)
- Loading branch information
1 parent
b93cd0f
commit 30137e0
Showing
4 changed files
with
30 additions
and
7 deletions.
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
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
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 |
---|---|---|
|
@@ -1195,6 +1195,7 @@ def test_get_embed_url(quicksight_service): | |
("[email protected]", "Carol", "Vor"), | ||
("[email protected]", "Ronnie", "Hotdogs"), | ||
("[email protected]", "Ci", "Ca"), | ||
("[email protected]", "Ci", "Ca"), | ||
], | ||
) | ||
def test_get_name_from_email(email, expected_forename, expected_surname): | ||
|
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 |
---|---|---|
|
@@ -31,10 +31,12 @@ def test_success_url(users, email, success_url): | |
@pytest.mark.parametrize( | ||
"email, name, expected_name, expected_justice_email", | ||
[ | ||
("email@exmaple.com", "User, Test", "Test User", None), | ||
("email@exmaple.com", "Test User", "Test User", None), | ||
("email@example.com", "User, Test", "Test User", None), | ||
("email@example.com", "Test User", "Test User", None), | ||
("[email protected]", "User, Test", "Test User", "[email protected]"), | ||
("[email protected]", "Test User", "Test User", "[email protected]"), | ||
("[email protected]", "Test User", "Test User", "[email protected]"), | ||
("[email protected]", "Test User", "Test User", "[email protected]"), | ||
], | ||
) | ||
def test_create_user(email, name, expected_name, expected_justice_email): | ||
|
@@ -49,3 +51,17 @@ def test_create_user(email, name, expected_name, expected_justice_email): | |
) | ||
assert user.name == expected_name | ||
assert user.justice_email == expected_justice_email | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"email, expected", | ||
[ | ||
("[email protected]", None), | ||
("[email protected]", "[email protected]"), | ||
("[email protected]", "[email protected]"), | ||
("[email protected]", "[email protected]"), | ||
("[email protected]", "[email protected]"), | ||
], | ||
) | ||
def test_get_justice_email(email, expected): | ||
assert OIDCSubAuthenticationBackend().get_justice_email(email) == expected |