#NEWLINE# def test_delete( 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 . post ( '/person/delete' , json . dumps ( dict ( ref = dict ( id = pid ) ) ) , headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/json' , #NEWLINE# #UNINDENT# } ) #NEWLINE# print ( r ) #NEWLINE# assert ( DBSession . query ( DBPerson ) . get ( p ) is None )