@@ -194,6 +194,19 @@ def test_allows_post_with_url_encoding(client):
194194 }
195195
196196
197+ # def test_benchmark(client, benchmark):
198+ # url = url_string()
199+ # data = urlencode(dict(query='{test}'))
200+ # def fun():
201+ # return client.post(url_string(), data=data, content_type='application/x-www-form-urlencoded')
202+
203+ # response = benchmark(fun)
204+ # assert response.status_code == 200
205+ # assert response_json(response) == {
206+ # 'data': {'test': "Hello World"}
207+ # }
208+
209+
197210def test_supports_post_json_query_with_string_variables (client ):
198211 response = client .post (url_string (), data = j (
199212 query = 'query helloWho($who: String){ test(who: $who) }' ,
@@ -353,7 +366,7 @@ def test_handles_field_errors_caught_by_graphql(client):
353366 assert response .status_code == 200
354367 assert response_json (response ) == {
355368 'data' : None ,
356- 'errors' : [{'locations' : [{'column' : 2 , 'line' : 1 }], 'message' : 'Throws!' }]
369+ 'errors' : [{'locations' : [{'column' : 2 , 'line' : 1 }], 'path' : [ 'thrower' ], ' message' : 'Throws!' }]
357370 }
358371
359372
@@ -362,7 +375,7 @@ def test_handles_syntax_errors_caught_by_graphql(client):
362375 assert response .status_code == 400
363376 assert response_json (response ) == {
364377 'errors' : [{'locations' : [{'column' : 1 , 'line' : 1 }],
365- 'message' : 'Syntax Error GraphQL request (1:1) '
378+ 'message' : 'Syntax Error GraphQL (1:1) '
366379 'Unexpected Name "syntaxerror"\n \n 1: syntaxerror\n ^\n ' }]
367380 }
368381
0 commit comments