From fa5f520bfa1e99a6a8db0def2325231bbf31ab09 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 1 Aug 2016 08:04:35 +0900 Subject: [PATCH] UT: Fix "RuntimeError: stop called on unstarted patcher" By removing explicit addCleanup calls. Closes-Bug: #1608303 Change-Id: I3744e7378cc809f1a5b1e1384d82ec154f6e2819 --- neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py | 1 - neutron_taas/tests/unit/taas_client/test_cli20_tapservice.py | 1 - 2 files changed, 2 deletions(-) diff --git a/neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py b/neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py index 1e8b000..50e366a 100644 --- a/neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py +++ b/neutron_taas/tests/unit/taas_client/test_cli20_tapflow.py @@ -34,7 +34,6 @@ class CLITestV20TapFlowJSON(test_cli20.CLITestV20Base): def _create_patch(self, name, func=None): patcher = mock.patch(name) thing = patcher.start() - self.addCleanup(patcher.stop) return thing def _mock_extension_loading(self): diff --git a/neutron_taas/tests/unit/taas_client/test_cli20_tapservice.py b/neutron_taas/tests/unit/taas_client/test_cli20_tapservice.py index 622fed9..b6428ba 100644 --- a/neutron_taas/tests/unit/taas_client/test_cli20_tapservice.py +++ b/neutron_taas/tests/unit/taas_client/test_cli20_tapservice.py @@ -34,7 +34,6 @@ class CLITestV20TapServiceJSON(test_cli20.CLITestV20Base): def _create_patch(self, name, func=None): patcher = mock.patch(name) thing = patcher.start() - self.addCleanup(patcher.stop) return thing def _mock_extension_loading(self):