1- from collections import OrderedDict
2-
31from promise import Promise
42from graphql import graphql
53from graphql .type import (
@@ -322,82 +320,82 @@ def test_contains_correct_field():
322320 'mutationType' : {
323321 'fields' : [
324322 {
325- 'name' : 'simpleMutation ' ,
323+ 'name' : 'simplePromiseMutation ' ,
326324 'args' : [
327325 {
328326 'name' : 'input' ,
329327 'type' : {
330328 'name' : None ,
331329 'kind' : 'NON_NULL' ,
332330 'ofType' : {
333- 'name' : 'SimpleMutationInput ' ,
331+ 'name' : 'SimplePromiseMutationInput ' ,
334332 'kind' : 'INPUT_OBJECT'
335333 }
336334 },
337335 }
338336 ],
339337 'type' : {
340- 'name' : 'SimpleMutationPayload ' ,
338+ 'name' : 'SimplePromiseMutationPayload ' ,
341339 'kind' : 'OBJECT' ,
342340 }
343341 },
344342 {
345- 'name' : 'simpleMutationWithThunkFields ' ,
343+ 'name' : 'simpleRootValueMutation ' ,
346344 'args' : [
347345 {
348346 'name' : 'input' ,
349347 'type' : {
350348 'name' : None ,
351349 'kind' : 'NON_NULL' ,
352350 'ofType' : {
353- 'name' : 'SimpleMutationWithThunkFieldsInput ' ,
351+ 'name' : 'SimpleRootValueMutationInput ' ,
354352 'kind' : 'INPUT_OBJECT'
355353 }
356354 },
357355 }
358356 ],
359357 'type' : {
360- 'name' : 'SimpleMutationWithThunkFieldsPayload ' ,
358+ 'name' : 'SimpleRootValueMutationPayload ' ,
361359 'kind' : 'OBJECT' ,
362360 }
363361 },
364362 {
365- 'name' : 'simplePromiseMutation ' ,
363+ 'name' : 'simpleMutation ' ,
366364 'args' : [
367365 {
368366 'name' : 'input' ,
369367 'type' : {
370368 'name' : None ,
371369 'kind' : 'NON_NULL' ,
372370 'ofType' : {
373- 'name' : 'SimplePromiseMutationInput ' ,
371+ 'name' : 'SimpleMutationInput ' ,
374372 'kind' : 'INPUT_OBJECT'
375373 }
376374 },
377375 }
378376 ],
379377 'type' : {
380- 'name' : 'SimplePromiseMutationPayload ' ,
378+ 'name' : 'SimpleMutationPayload ' ,
381379 'kind' : 'OBJECT' ,
382380 }
383381 },
384382 {
385- 'name' : 'simpleRootValueMutation ' ,
383+ 'name' : 'simpleMutationWithThunkFields ' ,
386384 'args' : [
387385 {
388386 'name' : 'input' ,
389387 'type' : {
390388 'name' : None ,
391389 'kind' : 'NON_NULL' ,
392390 'ofType' : {
393- 'name' : 'SimpleRootValueMutationInput ' ,
391+ 'name' : 'SimpleMutationWithThunkFieldsInput ' ,
394392 'kind' : 'INPUT_OBJECT'
395393 }
396394 },
397395 }
398396 ],
399397 'type' : {
400- 'name' : 'SimpleRootValueMutationPayload ' ,
398+ 'name' : 'SimpleMutationWithThunkFieldsPayload ' ,
401399 'kind' : 'OBJECT' ,
402400 }
403401 },
@@ -407,11 +405,4 @@ def test_contains_correct_field():
407405 }
408406 result = graphql (schema , query )
409407 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- )
417408 assert result .data == expected
0 commit comments