Skip to content

Commit 2247250

Browse files
artofhumanjkimbo
authored andcommitted
Asserting status code before decoding json in assertResponseNoEr… (#708)
1 parent b7e4937 commit 2247250

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphene_django/utils/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def assertResponseNoErrors(self, resp):
5454
the call was fine.
5555
:resp HttpResponse: Response
5656
"""
57-
content = json.loads(resp.content)
5857
self.assertEqual(resp.status_code, 200)
58+
content = json.loads(resp.content)
5959
self.assertNotIn("errors", list(content.keys()))
6060

6161
def assertResponseHasErrors(self, resp):

0 commit comments

Comments
 (0)