Skip to content

Commit

Permalink
http head integration test for num_found header
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Sep 14, 2020
1 parent 61747cc commit 201e5f4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/integration_tests/tests_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ def test_get_200(self):
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 0)

def test_head_200(self):
response = self.client.head(
'/users/{}/orgs/'.format(self.user.username),
HTTP_AUTHORIZATION='Token ' + self.token,
format='json'
)

self.assertEqual(response.status_code, 200)
self.assertEqual(response['num_found'], '2')

def test_post_405(self):
response = self.client.post(
'/users/{}/orgs/'.format(self.user.username),
Expand Down

0 comments on commit 201e5f4

Please sign in to comment.