File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
graphql_relay/mutation/tests Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ def test_contains_correct_field():
317
317
}
318
318
}
319
319
'''
320
- expected = OrderedDict ( {
320
+ expected = {
321
321
'__schema' : {
322
322
'mutationType' : {
323
323
'fields' : [
@@ -404,7 +404,16 @@ def test_contains_correct_field():
404
404
]
405
405
}
406
406
}
407
- })
407
+ }
408
408
result = graphql (schema , query )
409
409
assert not result .errors
410
- assert dict (result .data ) == expected
410
+ # ensure the ordering is correct for the assertion
411
+ expected ['__schema' ]['mutationType' ]['fields' ] = sorted (
412
+ expected ['__schema' ]['mutationType' ]['fields' ],
413
+ key = lambda k : k ['name' ]
414
+ )
415
+ result .data ['__schema' ]['mutationType' ]['fields' ] = sorted (
416
+ result .data ['__schema' ]['mutationType' ]['fields' ],
417
+ key = lambda k : k ['name' ]
418
+ )
419
+ assert result .data == expected
You can’t perform that action at this time.
0 commit comments