mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-25 18:43:44 +03:00
Added test case for reset by email in different case
This commit is contained in:
parent
56773d8618
commit
a93b7f5cec
|
@ -224,6 +224,15 @@ class APITestCase1(TestCase, BaseAPITestCase):
|
||||||
}
|
}
|
||||||
self.post(self.login_url, data=payload, status_code=200)
|
self.post(self.login_url, data=payload, status_code=200)
|
||||||
|
|
||||||
|
def test_password_reset_with_email_in_different_case(self):
|
||||||
|
user = get_user_model().objects.create_user(self.USERNAME, self.EMAIL.lower(), self.PASS)
|
||||||
|
|
||||||
|
# call password reset in upper case
|
||||||
|
mail_count = len(mail.outbox)
|
||||||
|
payload = {'email': self.EMAIL.upper()}
|
||||||
|
self.post(self.password_reset_url, data=payload, status_code=200)
|
||||||
|
self.assertEqual(len(mail.outbox), mail_count + 1)
|
||||||
|
|
||||||
def test_password_reset_with_invalid_email(self):
|
def test_password_reset_with_invalid_email(self):
|
||||||
get_user_model().objects.create_user(self.USERNAME, self.EMAIL, self.PASS)
|
get_user_model().objects.create_user(self.USERNAME, self.EMAIL, self.PASS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user