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():
317317 }
318318 }
319319 '''
320- expected = OrderedDict ( {
320+ expected = {
321321 '__schema' : {
322322 'mutationType' : {
323323 'fields' : [
@@ -404,7 +404,16 @@ def test_contains_correct_field():
404404 ]
405405 }
406406 }
407- })
407+ }
408408 result = graphql (schema , query )
409409 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