]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove double fanout mock
authorKevin Benton <blak111@gmail.com>
Fri, 26 Jun 2015 01:24:10 +0000 (18:24 -0700)
committerKevin Benton <blak111@gmail.com>
Fri, 26 Jun 2015 01:38:17 +0000 (18:38 -0700)
The test_mech_driver was duplicating a fanout mock already setup
in the setUp routine.

Change-Id: I5b88dff13113d55c72241d3d5025791a76672ac2
Partial-Bug: #1468998

neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py

index 9275689fe481df34311d62164d3c67224efc6a0f..52e233bc9e77bc983d40c80e5adf538fc0894601 100644 (file)
@@ -710,16 +710,10 @@ class TestL2PopulationRpcTestCase(test_plugin.Ml2PluginV2TestCase):
                 p1['status'] = 'ACTIVE'
                 self.mock_fanout.reset_mock()
 
-                fanout = ('neutron.plugins.ml2.drivers.l2pop.rpc.'
-                          'L2populationAgentNotifyAPI._notification_fanout')
-                fanout_patch = mock.patch(fanout)
-                mock_fanout = fanout_patch.start()
-
                 plugin = manager.NeutronManager.get_plugin()
                 plugin.update_port(self.adminContext, p1['id'], port1)
 
-                self.assertFalse(mock_fanout.called)
-                fanout_patch.stop()
+                self.assertFalse(self.mock_fanout.called)
 
     def test_get_device_details_port_id(self):
         self._register_ml2_agents()