From 224725039bb15373890d49329bb588104ab275cd Mon Sep 17 00:00:00 2001 From: Semyon Pupkov Date: Thu, 11 Jul 2019 22:32:07 +0300 Subject: [PATCH] =?UTF-8?q?Asserting=20status=20code=20before=20decoding?= =?UTF-8?q?=20json=20in=20assertResponseNoEr=E2=80=A6=20(#708)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- graphene_django/utils/testing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphene_django/utils/testing.py b/graphene_django/utils/testing.py index db3e9f4c5..0fdac7e16 100644 --- a/graphene_django/utils/testing.py +++ b/graphene_django/utils/testing.py @@ -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):