Skip to content

Commit

Permalink
Asserting status code before decoding json in assertResponseNoEr… (#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
artofhuman authored and jkimbo committed Jul 11, 2019
1 parent b7e4937 commit 2247250
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphene_django/utils/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def assertResponseNoErrors(self, resp):
the call was fine.
:resp HttpResponse: Response
"""
content = json.loads(resp.content)
self.assertEqual(resp.status_code, 200)
content = json.loads(resp.content)
self.assertNotIn("errors", list(content.keys()))

def assertResponseHasErrors(self, resp):
Expand Down

0 comments on commit 2247250

Please sign in to comment.