Update testing.py

This commit is contained in:
Tonye Jack 2020-11-24 14:07:23 -05:00 committed by GitHub
parent 030a8e7400
commit dd59975d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,8 +109,8 @@ class GraphQLTestCase(TestCase):
the call was fine.
:resp HttpResponse: Response
"""
self.assertEqual(resp.status_code, 200)
content = json.loads(resp.content)
self.assertEqual(resp.status_code, 200, msg or content)
self.assertNotIn("errors", list(content.keys()), msg or content)
def assertResponseHasErrors(self, resp, msg=None):