#NEWLINE# @ mock . patch . object ( obj_db_api , 'delete_object' ) #NEWLINE# def test_delete( self , delete_mock ) : #NEWLINE# #INDENT# obj = self . _test_class ( self . context , ** self . obj_fields [ 0 ] ) #NEWLINE# self . _check_equal ( obj , self . obj_fields [ 0 ] ) #NEWLINE# obj . delete ( ) #NEWLINE# self . _check_equal ( obj , self . obj_fields [ 0 ] ) #NEWLINE# delete_mock . assert_called_once_with ( self . context , obj . _test_class . db_model , ** obj . _get_composite_keys ( ) )