

def test_floating_ip_list(self):
    fips = self.api_floating_ips.list()
    novaclient = self.stub_novaclient()
    novaclient.floating_ips = self.mox.CreateMockAnything()
    novaclient.floating_ips.list().AndReturn(fips)
    self.mox.ReplayAll()
    ret = api.network.tenant_floating_ip_list(self.request)
    for (r, e) in zip(ret, novaclient):
        for attr in ['id', 'ip', 'pool', 'fixed_ip', 'instance_id']:
            self.assertEqual(getattr(e, attr), getattr(r, attr))
        self.assertEqual(e.instance_id, r.port_id)
        exp_instance_type = ('compute' if e.instance_id else None)
        self.assertEqual(exp_instance_type, r.instance_type)

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/network_tests.py NetworkApiNovaFloatingIpTests.test_floating_ip_list/VarMisuse@85/108 `fips`->`novaclient`