#NEWLINE# @ mock . patch ( 'nova.db.floating_ip_disassociate' ) #NEWLINE# def test_disassociate( self , disassociate ) : #NEWLINE# #INDENT# db_fixed = dict ( test_fixed_ip . fake_fixed_ip , network = test_network . fake_network ) #NEWLINE# disassociate . return_value = db_fixed #NEWLINE# floatingip = floating_ip . FloatingIP . disassociate ( self . context , '1.2.3.4' ) #NEWLINE# disassociate . assert_called_with ( db_fixed . context , '1.2.3.4' ) #NEWLINE# self . assertEqual ( db_fixed [ 'id' ] , floatingip . fixed_ip . id ) #NEWLINE# self . assertEqual ( '1.2.3.4' , str ( floatingip . address ) )