From 5ad6bbc50e8614d1d3125f0a24c6cc327e993904 Mon Sep 17 00:00:00 2001 From: Noelle Leigh Date: Fri, 17 Apr 2020 15:53:35 -0400 Subject: [PATCH] Improve test comments --- graphene_django/tests/test_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/graphene_django/tests/test_utils.py b/graphene_django/tests/test_utils.py index e4ff066..74e3c85 100644 --- a/graphene_django/tests/test_utils.py +++ b/graphene_django/tests/test_utils.py @@ -40,7 +40,7 @@ def test_camelize(): @patch("graphene_django.utils.testing.Client.post") def test_graphql_test_case_op_name(post_mock): """ - Test that `GraphQLTestCase.query()`'s `op_name` argument produces an `operationName` key. + Test that `GraphQLTestCase.query()`'s `op_name` argument produces an `operationName` field. """ class TestClass(GraphQLTestCase): @@ -50,7 +50,8 @@ def test_graphql_test_case_op_name(post_mock): tc.setUpClass() tc.query("query { }", op_name="QueryName") body = json.loads(post_mock.call_args.args[1]) + # `operationName` field from https://graphql.org/learn/serving-over-http/#post-request assert ( "operationName", "QueryName", - ) in body.items(), "Key 'operationName' is not present in the final request." + ) in body.items(), "Field 'operationName' is not present in the final request."