#NEWLINE# @ mock . patch ( 'nova.db.fixed_ips_by_virtual_interface' ) #NEWLINE# def test_get_by_virtual_interface_id( self , get ) : #NEWLINE# #INDENT# get . return_value = [ fake_fixed_ip ] #NEWLINE# fixedips = fixed_ip . FixedIPList . get_by_virtual_interface_id ( self . context , 123 ) #NEWLINE# self . assertEqual ( 1 , len ( fixedips ) ) #NEWLINE# get . assert_called_once_with ( self . context , 123 ) #NEWLINE# self . _compare ( fixedips [ 0 ] , fake_fixed_ip )