fixes to the my_ views, and their tests

This commit is contained in:
Sam
2021-02-12 12:03:16 +00:00
parent 0a61cea599
commit c4faa89a99
7 changed files with 32 additions and 7 deletions

View File

@@ -521,8 +521,11 @@ class MyUserViewTest(APITestCase):
# Query endpoint
response = self.client.get(self.endpoint)
payload = response.json()
# Assert forbidden code
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEquals(self.email, payload['email'])
def test_anon_user_cannot_access(self):
# send in request