#NEWLINE# def test_rejects_fragment_names( ) : #NEWLINE# #INDENT# body = 'fragment Foo on Type { field } ' #NEWLINE# doc = parse ( body ) #NEWLINE# with raises ( Exception ) as excinfo : #NEWLINE# #INDENT# build_ast_schema ( doc , 'Foo' ) #NEWLINE# #UNINDENT# assert ( 'Specified query type Foo not found in document' in str ( doc . value ) )