24 lines
767 B
Python
24 lines
767 B
Python
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) |