mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
fix headers NoneType case in GraphQLTestCase.query
This commit is contained in:
parent
bc20a38936
commit
1b02624cc6
|
@ -53,10 +53,14 @@ class GraphQLTestCase(TestCase):
|
||||||
body["variables"]["input"] = input_data
|
body["variables"]["input"] = input_data
|
||||||
else:
|
else:
|
||||||
body["variables"] = {"input": input_data}
|
body["variables"] = {"input": input_data}
|
||||||
|
if headers:
|
||||||
resp = self._client.post(
|
resp = self._client.post(
|
||||||
self.GRAPHQL_URL, json.dumps(body), content_type="application/json", **headers
|
self.GRAPHQL_URL, json.dumps(body), content_type="application/json", **headers
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
resp = self._client.post(
|
||||||
|
self.GRAPHQL_URL, json.dumps(body), content_type="application/json"
|
||||||
|
)
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
def assertResponseNoErrors(self, resp):
|
def assertResponseNoErrors(self, resp):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user