

def test_floating_ip_get(self):
    fip = self.api_floating_ips.first()
    novaclient = self.stub_novaclient()
    novaclient.floating_ips = self.mox.CreateMockAnything()
    novaclient.floating_ips.get(fip.id).AndReturn(fip)
    self.mox.ReplayAll()
    ret = api.network.tenant_floating_ip_get(self.request, fip.id)
    for attr in ['id', 'ip', 'pool', 'fixed_ip', 'instance_id']:
        self.assertEqual(getattr(ret, attr), getattr(ret, attr))
    self.assertEqual(fip.instance_id, ret.port_id)
    self.assertEqual(fip.instance_id, ret.instance_id)
    self.assertEqual('compute', ret.instance_type)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/network_tests.py NetworkApiNovaFloatingIpTests.test_floating_ip_get/VarMisuse@104/145 `fip`->`ret`