1
- from collections import OrderedDict
2
-
3
1
from promise import Promise
4
2
from graphql import graphql
5
3
from graphql .type import (
@@ -322,82 +320,82 @@ def test_contains_correct_field():
322
320
'mutationType' : {
323
321
'fields' : [
324
322
{
325
- 'name' : 'simpleMutation ' ,
323
+ 'name' : 'simplePromiseMutation ' ,
326
324
'args' : [
327
325
{
328
326
'name' : 'input' ,
329
327
'type' : {
330
328
'name' : None ,
331
329
'kind' : 'NON_NULL' ,
332
330
'ofType' : {
333
- 'name' : 'SimpleMutationInput ' ,
331
+ 'name' : 'SimplePromiseMutationInput ' ,
334
332
'kind' : 'INPUT_OBJECT'
335
333
}
336
334
},
337
335
}
338
336
],
339
337
'type' : {
340
- 'name' : 'SimpleMutationPayload ' ,
338
+ 'name' : 'SimplePromiseMutationPayload ' ,
341
339
'kind' : 'OBJECT' ,
342
340
}
343
341
},
344
342
{
345
- 'name' : 'simpleMutationWithThunkFields ' ,
343
+ 'name' : 'simpleRootValueMutation ' ,
346
344
'args' : [
347
345
{
348
346
'name' : 'input' ,
349
347
'type' : {
350
348
'name' : None ,
351
349
'kind' : 'NON_NULL' ,
352
350
'ofType' : {
353
- 'name' : 'SimpleMutationWithThunkFieldsInput ' ,
351
+ 'name' : 'SimpleRootValueMutationInput ' ,
354
352
'kind' : 'INPUT_OBJECT'
355
353
}
356
354
},
357
355
}
358
356
],
359
357
'type' : {
360
- 'name' : 'SimpleMutationWithThunkFieldsPayload ' ,
358
+ 'name' : 'SimpleRootValueMutationPayload ' ,
361
359
'kind' : 'OBJECT' ,
362
360
}
363
361
},
364
362
{
365
- 'name' : 'simplePromiseMutation ' ,
363
+ 'name' : 'simpleMutation ' ,
366
364
'args' : [
367
365
{
368
366
'name' : 'input' ,
369
367
'type' : {
370
368
'name' : None ,
371
369
'kind' : 'NON_NULL' ,
372
370
'ofType' : {
373
- 'name' : 'SimplePromiseMutationInput ' ,
371
+ 'name' : 'SimpleMutationInput ' ,
374
372
'kind' : 'INPUT_OBJECT'
375
373
}
376
374
},
377
375
}
378
376
],
379
377
'type' : {
380
- 'name' : 'SimplePromiseMutationPayload ' ,
378
+ 'name' : 'SimpleMutationPayload ' ,
381
379
'kind' : 'OBJECT' ,
382
380
}
383
381
},
384
382
{
385
- 'name' : 'simpleRootValueMutation ' ,
383
+ 'name' : 'simpleMutationWithThunkFields ' ,
386
384
'args' : [
387
385
{
388
386
'name' : 'input' ,
389
387
'type' : {
390
388
'name' : None ,
391
389
'kind' : 'NON_NULL' ,
392
390
'ofType' : {
393
- 'name' : 'SimpleRootValueMutationInput ' ,
391
+ 'name' : 'SimpleMutationWithThunkFieldsInput ' ,
394
392
'kind' : 'INPUT_OBJECT'
395
393
}
396
394
},
397
395
}
398
396
],
399
397
'type' : {
400
- 'name' : 'SimpleRootValueMutationPayload ' ,
398
+ 'name' : 'SimpleMutationWithThunkFieldsPayload ' ,
401
399
'kind' : 'OBJECT' ,
402
400
}
403
401
},
@@ -407,11 +405,4 @@ def test_contains_correct_field():
407
405
}
408
406
result = graphql (schema , query )
409
407
assert not result .errors
410
- # ensure the ordering is correct for the assertion
411
- expected ['__schema' ]['mutationType' ]['fields' ] = sorted (
412
- expected ['__schema' ]['mutationType' ]['fields' ]
413
- )
414
- result .data ['__schema' ]['mutationType' ]['fields' ] = sorted (
415
- result .data ['__schema' ]['mutationType' ]['fields' ]
416
- )
417
408
assert result .data == expected
0 commit comments