#NEWLINE# @ mock . patch ( 'nova.db.floating_ip_get' ) #NEWLINE# def test_get_by_id( self , get ) : #NEWLINE# #INDENT# db_floatingip = dict ( fake_floating_ip , fixed_ip = test_fixed_ip . fake_fixed_ip ) #NEWLINE# get . return_value = db_floatingip #NEWLINE# floatingip = floating_ip . FloatingIP . get_by_id ( self . context , 123 ) #NEWLINE# get . assert_called_once_with ( self . context , 123 ) #NEWLINE# self . _compare ( floatingip , db_floatingip )