#NEWLINE# def test_fails_as_expected_on_the_type_root_field_without_an_arg( ) : #NEWLINE# #INDENT# TestType = GraphQLObjectType ( 'TestType' , { #NEWLINE# #INDENT# 'testField' : GraphQLField ( GraphQLString ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# schema = GraphQLSchema ( TestType ) #NEWLINE# request = '\n    {\n        __type {\n           name\n        }\n    }' #NEWLINE# result = graphql ( schema , TestType ) #NEWLINE# expected_error = { #NEWLINE# #INDENT# 'message' : ProvidedNonNullArguments . missing_field_arg_message ( '__type' , 'name' , 'String!' ) , #NEWLINE# 'locations' : [ dict ( line = 3 , column = 9 ) ] , #NEWLINE# #UNINDENT# } #NEWLINE# assert ( expected_error in [ format_error ( error ) for error in result . errors ] )