#NEWLINE# @ mock . patch ( 'nova.db.fixed_ip_update' ) #NEWLINE# def test_save( self , update ) : #NEWLINE# #INDENT# update . return_value = fake_fixed_ip #NEWLINE# fixedip = fixed_ip . FixedIP ( context = fixedip . context , address = '1.2.3.4' , instance_uuid = 'fake-uuid' ) #NEWLINE# self . assertRaises ( exception . ObjectActionError , fixedip . save ) #NEWLINE# fixedip . obj_reset_changes ( [ 'address' ] ) #NEWLINE# fixedip . save ( ) #NEWLINE# update . assert_called_once_with ( self . context , '1.2.3.4' , { #NEWLINE# #INDENT# 'instance_uuid' : 'fake-uuid' , #NEWLINE# #UNINDENT# } )