-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finish tests and revert format of utils.send_email_with_callback_token
- Loading branch information
1 parent
663cc28
commit ba5645a
Showing
2 changed files
with
14 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,15 +47,18 @@ def test_email_sender_required(self): | |
email_response = self.client.post(self.email_url, self.email_data) | ||
self.assertEqual(email_response.status_code, status.HTTP_400_BAD_REQUEST) | ||
|
||
def test_mobile_sender_required(self): | ||
def test_email_tokon_as_url(self): | ||
""" | ||
Check to make sure user has a send address if mobile is selected. | ||
Check selecting send token within URL does not fail | ||
""" | ||
api_settings.PASSWORDLESS_AUTH_TYPES = ['MOBILE'] | ||
email_response = self.client.post(self.mobile_url, self.mobile_data) | ||
self.assertEqual(email_response.status_code, status.HTTP_400_BAD_REQUEST) | ||
api_settings.PASSWORDLESS_AUTH_TYPES = ['EMAIL'] | ||
api_settings.PASSWORDLESS_LOGIN_URL_DOMAIN = 'https://domain.com/' | ||
api_settings.PASSWORDLESS_EMAIL_NOREPLY_ADDRESS = '[email protected]' | ||
|
||
email_response = self.client.post(self.email_url, self.email_data) | ||
self.assertEqual(email_response.status_code, status.HTTP_200_OK) | ||
|
||
def test_tokon_as_url(self): | ||
def test_mobile_sender_required(self): | ||
""" | ||
Check to make sure user has a send address if mobile is selected. | ||
""" | ||
|