From: Ihar Hrachyshka Date: Mon, 9 Jun 2014 12:21:05 +0000 (+0200) Subject: Don't explicitly call .stop() on mock.patch objects X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9e6b0ad9c622d724f7428da758f5fd30ae5bb875;p=openstack-build%2Fneutron-build.git Don't explicitly call .stop() on mock.patch objects BaseTestCase already cleans up all mocks via .stopall(), so there is no need to do it in each test case. Change-Id: I7165ea9682a3dce3a76e90e309b763c939729d84 --- diff --git a/neutron/tests/unit/openvswitch/test_agent_scheduler.py b/neutron/tests/unit/openvswitch/test_agent_scheduler.py index e1c5a669b..6a03e0671 100644 --- a/neutron/tests/unit/openvswitch/test_agent_scheduler.py +++ b/neutron/tests/unit/openvswitch/test_agent_scheduler.py @@ -1040,7 +1040,6 @@ class OvsDhcpAgentNotifierTestCase(test_l3_plugin.L3NatTestCaseMixin, # the global attribute map attributes.RESOURCE_ATTRIBUTE_MAP.update( agent.RESOURCE_ATTRIBUTE_MAP) - self.addCleanup(self.dhcp_notifier_cls_p.stop) self.addCleanup(self.restore_attribute_map) def restore_attribute_map(self): @@ -1190,7 +1189,6 @@ class OvsL3AgentNotifierTestCase(test_l3_plugin.L3NatTestCaseMixin, # the global attribute map attributes.RESOURCE_ATTRIBUTE_MAP.update( agent.RESOURCE_ATTRIBUTE_MAP) - self.addCleanup(self.dhcp_notifier_cls_p.stop) self.addCleanup(self.restore_attribute_map) def restore_attribute_map(self):