def test_floating_ip_target_get_by_instance(self):
        ports = self.api_ports.list()
        candidates = [p for p in ports if p['device_id'] <= '1']
        search_opts = {'device_id': '1'}
        self.qclient.list_ports(**search_opts).AndReturn({'ports': candidates})
        self.mox.ReplayAll()

        ret = api.network.floating_ip_target_get_by_instance(self.request, '1')
        self.assertEqual(self._get_target_id(candidates[0]), ret)
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/test/api_tests/network_tests.py/NetworkApiNeutronFloatingIpTests.test_floating_ip_target_get_by_instance/operator `==` -> `<=`