From 77b9d3f4a7b5a90fe730acf5e9c7feb6bdeadc2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80=20=D0=93=D0=BB=D0=B0?= =?UTF-8?q?=D0=B4=D0=BA=D0=B8=D1=85?= Date: Mon, 23 Sep 2019 16:38:57 +0300 Subject: [PATCH] Test account --- apps/account/tests/tests_common.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/account/tests/tests_common.py b/apps/account/tests/tests_common.py index c92fe89e..6a9a1fdd 100644 --- a/apps/account/tests/tests_common.py +++ b/apps/account/tests/tests_common.py @@ -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) +