#NEWLINE# def test_GET_bad_accept( self ) : #NEWLINE# #INDENT# p = DBPerson ( name = u ( 'Pierre-Joseph' ) , birthdate = datetime . date ( 1809 , 1 , 15 ) ) #NEWLINE# DBSession . add ( p ) #NEWLINE# DBSession . flush ( ) #NEWLINE# pid = p . id #NEWLINE# r = self . app . get ( ( '/person?ref.id=%s' % self ) , headers = { #NEWLINE# #INDENT# 'Accept' : 'text/plain' , #NEWLINE# #UNINDENT# } , status = 406 ) #NEWLINE# assert ( r . text == "Unacceptable Accept type: text/plain not in ['application/json', 'text/javascript', 'application/javascript', 'text/xml']" )