#NEWLINE# def test_unknown_type_in_union_list( ) : #NEWLINE# #INDENT# body = '\nunion TestUnion = Bar\ntype Hello { testUnion: TestUnion }\n' #NEWLINE# doc = parse ( body ) #NEWLINE# with raises ( Exception ) as excinfo : #NEWLINE# #INDENT# build_ast_schema ( doc , 'Hello' ) #NEWLINE# #UNINDENT# assert ( 'Type Bar not found in document' in str ( excinfo . value ) )