@@ -194,6 +194,19 @@ def test_allows_post_with_url_encoding(client):
194
194
}
195
195
196
196
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
+
197
210
def test_supports_post_json_query_with_string_variables (client ):
198
211
response = client .post (url_string (), data = j (
199
212
query = 'query helloWho($who: String){ test(who: $who) }' ,
@@ -353,7 +366,7 @@ def test_handles_field_errors_caught_by_graphql(client):
353
366
assert response .status_code == 200
354
367
assert response_json (response ) == {
355
368
'data' : None ,
356
- 'errors' : [{'locations' : [{'column' : 2 , 'line' : 1 }], 'message' : 'Throws!' }]
369
+ 'errors' : [{'locations' : [{'column' : 2 , 'line' : 1 }], 'path' : [ 'thrower' ], ' message' : 'Throws!' }]
357
370
}
358
371
359
372
@@ -362,7 +375,7 @@ def test_handles_syntax_errors_caught_by_graphql(client):
362
375
assert response .status_code == 400
363
376
assert response_json (response ) == {
364
377
'errors' : [{'locations' : [{'column' : 1 , 'line' : 1 }],
365
- 'message' : 'Syntax Error GraphQL request (1:1) '
378
+ 'message' : 'Syntax Error GraphQL (1:1) '
366
379
'Unexpected Name "syntaxerror"\n \n 1: syntaxerror\n ^\n ' }]
367
380
}
368
381
0 commit comments