#NEWLINE# def test_assigment_and_deletion( self ) : #NEWLINE# #INDENT# self . save ( ) #NEWLINE# event = self . session . query ( self . Event ) . first ( ) #NEWLINE# assert ( event . locations [ 0 ] . name == 'Some location' ) #NEWLINE# assert ( event . locations [ 0 ] . address . street == 'Some address' ) #NEWLINE# data = { #NEWLINE# #INDENT# 'name' : 'Some event' , #NEWLINE# #UNINDENT# } #NEWLINE# form = self . EventForm ( MultiDict ( data ) ) #NEWLINE# form . validate ( ) #NEWLINE# form . populate_obj ( event ) #NEWLINE# self . session . commit ( ) #NEWLINE# event = self . session . query ( self . Event ) . first ( ) #NEWLINE# assert ( event . locations == [ ] )