From 0ebc8990842bc4436d1986e2a1f8bdf0979d17de Mon Sep 17 00:00:00 2001 From: Nikolai R Kristiansen Date: Mon, 26 Sep 2022 09:29:45 +0200 Subject: [PATCH] Fix tests on python 3.7 --- graphene_django/tests/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphene_django/tests/test_utils.py b/graphene_django/tests/test_utils.py index 5958a8c..fa269b4 100644 --- a/graphene_django/tests/test_utils.py +++ b/graphene_django/tests/test_utils.py @@ -54,7 +54,7 @@ def test_graphql_test_case_operation_name(post_mock): tc._pre_setup() tc.setUpClass() tc.query("query { }", operation_name="QueryName") - body = json.loads(post_mock.call_args.args[1]) + body = json.loads(post_mock.call_args[0][1]) # `operationName` field from https://graphql.org/learn/serving-over-http/#post-request assert ( "operationName", @@ -66,7 +66,7 @@ def test_graphql_test_case_operation_name(post_mock): @patch("graphene_django.utils.testing.Client.post") def test_graphql_query_case_operation_name(post_mock): graphql_query("query { }", operation_name="QueryName") - body = json.loads(post_mock.call_args.args[1]) + body = json.loads(post_mock.call_args[0][1]) # `operationName` field from https://graphql.org/learn/serving-over-http/#post-request assert ( "operationName",