]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Don't explicitly call .stop() on mock.patch objects
authorIhar Hrachyshka <ihrachys@redhat.com>
Mon, 9 Jun 2014 12:21:05 +0000 (14:21 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Tue, 17 Jun 2014 19:56:24 +0000 (21:56 +0200)
BaseTestCase already cleans up all mocks via .stopall(), so there is no
need to do it in each test case.

Change-Id: I7165ea9682a3dce3a76e90e309b763c939729d84

neutron/tests/unit/openvswitch/test_agent_scheduler.py

index e1c5a669b19bd4ec45ead0b6506e880d2cf107eb..6a03e067163a399671318a02fcb927be156cee37 100644 (file)
@@ -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):