Test account

This commit is contained in:
Виктор Гладких 2019-09-23 16:38:57 +03:00
parent b57eb29b1c
commit 77b9d3f4a7

View File

@ -41,5 +41,19 @@ class AccountUserTests(APITestCase):
self.assertEqual(response.status_code, status.HTTP_200_OK)
class AccountChangePasswordTests(APITestCase):
url = '/api/web/account/change-password/'
def setUp(self):
self.data = get_tokens_for_user()
def test_change_password(self):
data = {
"password": "new password"
}
response = self.client.patch(self.url, data=data, format='json')
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)