From 135ab8f83af05c9edf933169d8bd85c71890637e Mon Sep 17 00:00:00 2001 From: Charles Short Date: Thu, 17 May 2018 21:40:19 -0400 Subject: [PATCH] Remove moxstubout Newer versions of oslo.service will have moxstubout deprecated, so get out in front of the curve and remove it. Change-Id: I74369b90c3d9352e1c59062bda8410a09675b40c Signed-off-by: Charles Short --- oslo_service/tests/test_wsgi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/oslo_service/tests/test_wsgi.py b/oslo_service/tests/test_wsgi.py index 23cbe240..332b56ca 100644 --- a/oslo_service/tests/test_wsgi.py +++ b/oslo_service/tests/test_wsgi.py @@ -34,7 +34,6 @@ from oslo_service import sslutils from oslo_service.tests import base from oslo_service import wsgi from oslo_utils import netutils -from oslotest import moxstubout SSL_CERT_DIR = os.path.normpath(os.path.join( @@ -56,9 +55,10 @@ class TestLoaderNothingExists(WsgiTestCase): def setUp(self): super(TestLoaderNothingExists, self).setUp() - mox_fixture = self.useFixture(moxstubout.MoxStubout()) - self.stubs = mox_fixture.stubs - self.stubs.Set(os.path, 'exists', lambda _: False) + mock_patcher = mock.patch.object(os.path, 'exists', + lambda _: False) + mock_patcher.start() + self.addCleanup(mock_patcher.stop) def test_relpath_config_not_found(self): self.config(api_paste_config='api-paste.ini')