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
This commit is contained in:
Ihar Hrachyshka 2014-06-09 14:21:05 +02:00
parent 3e6393de51
commit d60aa38ed8

View File

@ -1040,7 +1040,6 @@ class OvsDhcpAgentNotifierTestCase(test_l3_plugin.L3NatTestCaseMixin,
# the global attribute map # the global attribute map
attributes.RESOURCE_ATTRIBUTE_MAP.update( attributes.RESOURCE_ATTRIBUTE_MAP.update(
agent.RESOURCE_ATTRIBUTE_MAP) agent.RESOURCE_ATTRIBUTE_MAP)
self.addCleanup(self.dhcp_notifier_cls_p.stop)
self.addCleanup(self.restore_attribute_map) self.addCleanup(self.restore_attribute_map)
def restore_attribute_map(self): def restore_attribute_map(self):
@ -1190,7 +1189,6 @@ class OvsL3AgentNotifierTestCase(test_l3_plugin.L3NatTestCaseMixin,
# the global attribute map # the global attribute map
attributes.RESOURCE_ATTRIBUTE_MAP.update( attributes.RESOURCE_ATTRIBUTE_MAP.update(
agent.RESOURCE_ATTRIBUTE_MAP) agent.RESOURCE_ATTRIBUTE_MAP)
self.addCleanup(self.dhcp_notifier_cls_p.stop)
self.addCleanup(self.restore_attribute_map) self.addCleanup(self.restore_attribute_map)
def restore_attribute_map(self): def restore_attribute_map(self):