Test reset password
This commit is contained in:
parent
2ad2b3b56d
commit
28ae1ab8d1
24
apps/account/tests/tests_web.py
Normal file
24
apps/account/tests/tests_web.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from rest_framework.test import APITestCase
|
||||
from rest_framework import status
|
||||
from authorization.tests.tests import get_tokens_for_user
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
class AccountResetPassWordTests(APITestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.data = get_tokens_for_user()
|
||||
|
||||
def test_reset_password(self):
|
||||
url = reverse('web:account:password-reset')
|
||||
data = {
|
||||
"username_or_email": self.data["email"]
|
||||
}
|
||||
response = self.client.post(url, data=data)
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
|
||||
data = {
|
||||
"username_or_email": self.data["username"]
|
||||
}
|
||||
response = self.client.post(url, data=data)
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
Loading…
Reference in New Issue
Block a user