From: sridhargaddam Date: Fri, 28 Mar 2014 22:10:27 +0000 (+0530) Subject: Invalid ovs-agent test case - test_fdb_add_flows X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=aeea31b21245864888f4744c19a0fed2a9c6567e;p=openstack-build%2Fneutron-build.git Invalid ovs-agent test case - test_fdb_add_flows setup_tunnel_port is an attribute of self.agent and not self.agent.tun_br. This patch fixes the testcase accordingly. Closes-Bug: #1284265 Change-Id: I70582e477bb53de6482e32d5913c0864c5d910cc --- diff --git a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py index 13464ca54..7e62671c9 100644 --- a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py +++ b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py @@ -605,10 +605,10 @@ class TestOvsNeutronAgent(base.BaseTestCase): with contextlib.nested( mock.patch.object(self.agent.tun_br, 'add_flow'), mock.patch.object(self.agent.tun_br, 'mod_flow'), - mock.patch.object(self.agent.tun_br, 'setup_tunnel_port'), + mock.patch.object(self.agent, 'setup_tunnel_port'), ) as (add_flow_fn, mod_flow_fn, add_tun_fn): - add_tun_fn.return_value = '2' self.agent.fdb_add(None, fdb_entry) + self.assertFalse(add_tun_fn.called) add_flow_fn.assert_called_with(table=constants.UCAST_TO_TUN, priority=2, dl_vlan='vlan1',