mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-16 07:02:04 +03:00
Fix merge
This commit is contained in:
parent
270108d472
commit
c636585f2e
|
@ -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` field.
|
||||
Test that `GraphQLTestCase.query()`'s `operation_name` argument produces an `operationName` field.
|
||||
"""
|
||||
|
||||
class TestClass(GraphQLTestCase):
|
||||
|
@ -51,7 +51,7 @@ def test_graphql_test_case_op_name(post_mock):
|
|||
|
||||
tc = TestClass()
|
||||
tc.setUpClass()
|
||||
tc.query("query { }", op_name="QueryName")
|
||||
tc.query("query { }", operation_name="QueryName")
|
||||
body = json.loads(post_mock.call_args.args[1])
|
||||
# `operationName` field from https://graphql.org/learn/serving-over-http/#post-request
|
||||
assert (
|
||||
|
|
|
@ -46,8 +46,8 @@ class GraphQLTestCase(TestCase):
|
|||
Response object from client
|
||||
"""
|
||||
body = {"query": query}
|
||||
if op_name:
|
||||
body["operationName"] = op_name
|
||||
if operation_name:
|
||||
body["operationName"] = operation_name
|
||||
if variables:
|
||||
body["variables"] = variables
|
||||
if input_data:
|
||||
|
|
Loading…
Reference in New Issue
Block a user