#NEWLINE# def test_correct_fetch_first_ship_rebels( ) : #NEWLINE# #INDENT# query = '\n    query RebelsShipsQuery {\n      rebels {\n        name,\n        ships(first: 1) {\n          edges {\n            node {\n              name\n            }\n          }\n        }\n      }\n    }\n    ' #NEWLINE# expected = { #NEWLINE# #INDENT# 'rebels' : { #NEWLINE# #INDENT# 'name' : 'Alliance to Restore the Republic' , #NEWLINE# 'ships' : { #NEWLINE# #INDENT# 'edges' : [ { #NEWLINE# #INDENT# 'node' : { #NEWLINE# #INDENT# 'name' : 'X-Wing' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# result = graphql ( StarWarsSchema , query ) #NEWLINE# assert ( not result . errors ) #NEWLINE# assert ( result . data == expected )