def test_user_change_other_password(self):
self._asJoeBloggs()
new_password = {'new_password': 'super duper password'}
response = self._client.patch("/users/%d/change_password/" % self._janeDoe.id,
new_password, format='json')
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
user1 = User.objects.get(username="Joe Bloggs")
self.assertIs(check_password('super duper password', user1.password), False)
评论列表
文章目录