-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
Users.send_magic_auth_code()
method
- Loading branch information
1 parent
fffb80f
commit 7639493
Showing
2 changed files
with
46 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 |
---|---|---|
|
@@ -359,3 +359,18 @@ def test_verify_email(self, capture_and_mock_request, mock_user): | |
|
||
assert url[0].endswith("users/verify_email") | ||
assert response["id"] == "user_01H7ZGXFP5C6BBQY6Z7277ZCT0" | ||
|
||
def test_send_magic_auth_code( | ||
self, capture_and_mock_request, mock_magic_auth_challenge_response | ||
): | ||
email = "[email protected]" | ||
|
||
url, request = capture_and_mock_request( | ||
"post", mock_magic_auth_challenge_response, 200 | ||
) | ||
|
||
response = self.users.send_magic_auth_code(email=email) | ||
|
||
assert url[0].endswith("users/send_magic_auth_code") | ||
assert request["json"]["email"] == email | ||
assert response["id"] == "auth_challenge_01E4ZCR3C56J083X43JQXF3JK5" |
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