Skip to content

Commit

Permalink
delete tests updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Lvyshnevska committed Oct 12, 2023
1 parent 19c3e84 commit 5eb105e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions profiles/tests/test_crud_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ def test_delete_profile_authorized_with_wrong_password(self):
data={"password": "Test5678"},
)
self.assertEqual(status.HTTP_400_BAD_REQUEST, response.status_code)
self.assertEqual(
{"password": ["Invalid password"]},
response.json(),
)

def test_delete_profile_authorized_without_password(self):
self.client.force_authenticate(self.user)
Expand All @@ -408,6 +412,10 @@ def test_delete_profile_authorized_without_password(self):
)
)
self.assertEqual(status.HTTP_400_BAD_REQUEST, response.status_code)
self.assertEqual(
{"password": ["This field is required."]},
response.json(),
)

def test_delete_profile_of_other_user_authorized(self):
self.user.set_password("Test1234")
Expand Down

0 comments on commit 5eb105e

Please sign in to comment.