Skip to content

Commit

Permalink
Don't explicitly call .stop() on mock.patch objects
Browse files Browse the repository at this point in the history
BaseTestCase already cleans up all mocks via .stopall(), so there is no
need to do it in each test case.

Change-Id: I7165ea9682a3dce3a76e90e309b763c939729d84
  • Loading branch information
booxter committed Jun 17, 2014
1 parent 469a1ca commit 9e6b0ad
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions neutron/tests/unit/openvswitch/test_agent_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,6 @@ def setUp(self):
# 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):
Expand Down Expand Up @@ -1190,7 +1189,6 @@ def setUp(self):
# 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):
Expand Down

0 comments on commit 9e6b0ad

Please sign in to comment.