From aeea31b21245864888f4744c19a0fed2a9c6567e Mon Sep 17 00:00:00 2001 From: sridhargaddam Date: Sat, 29 Mar 2014 03:40:27 +0530 Subject: [PATCH] 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 --- neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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', -- 2.45.2