]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Invalid ovs-agent test case - test_fdb_add_flows
authorsridhargaddam <sridhar.gaddam@enovance.com>
Fri, 28 Mar 2014 22:10:27 +0000 (03:40 +0530)
committersridhargaddam <sridhar.gaddam@enovance.com>
Sat, 29 Mar 2014 11:54:26 +0000 (17:24 +0530)
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

index 13464ca547b17ed4ae8b5bd6bf601cfb0605ed43..7e62671c9a72c643936569b1e57b13013c4a879a 100644 (file)
@@ -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',