From: Jakub Libosvar Date: Tue, 6 Jan 2015 22:21:57 +0000 (+0100) Subject: Fix UT for L2pop test_get_agent_ports_no_data() X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=5e5f74180c264d3bae2be1cf62ae89ab656c2dd7;p=openstack-build%2Fneutron-build.git Fix UT for L2pop test_get_agent_ports_no_data() Previously loop in this test has never been executed because returned generator was empty. This patch validates that generator is empty. Change-Id: I900cd7bccee16487ab5469a2222afd294d9dee25 Closes-Bug: #1365388 --- diff --git a/neutron/tests/unit/agent/test_l2population_rpc.py b/neutron/tests/unit/agent/test_l2population_rpc.py index b0b8f7e49..282d5c4fb 100644 --- a/neutron/tests/unit/agent/test_l2population_rpc.py +++ b/neutron/tests/unit/agent/test_l2population_rpc.py @@ -26,10 +26,8 @@ class TestL2populationRpcCallBackTunnelMixin( l2population_rpc_base.TestL2populationRpcCallBackTunnelMixinBase): def test_get_agent_ports_no_data(self): - for lvm, agent_ports in self.fakeagent.get_agent_ports( - self.fdb_entries1, {}): - self.assertIsNone(lvm) - self.assertEqual({}, agent_ports) + self.assertFalse( + list(self.fakeagent.get_agent_ports(self.fdb_entries1, {}))) def test_get_agent_ports_non_existence_key_in_lvm(self): results = {}