summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Short <chucks@redhat.com>2018-08-21 23:41:58 -0400
committerChuck Short <chucks@redhat.com>2018-08-21 23:42:53 -0400
commitdc2ba62297b5b8a8c9eeecbe2a4678fe4844a1f7 (patch)
tree9e2f20e31538ef5abf27bf1dbb246d10c81dfe5d
parent67169dc23a248936f12d20f32976b8fc8abe6217 (diff)
downloadoslo-middleware-dc2ba62297b5b8a8c9eeecbe2a4678fe4844a1f7.tar.gz
Remove moxstubout usage
As of version 3.5.0 moxstub will be deprecated, so remove it where it has been used. Change-Id: Ic98f3035fd9dff165259e3d194ab5eea11469169 Signed-off-by: Chuck Short <chucks@redhat.com>
-rw-r--r--oslo_middleware/tests/test_correlation_id.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/oslo_middleware/tests/test_correlation_id.py b/oslo_middleware/tests/test_correlation_id.py
index 63177fa..e2685bf 100644
--- a/oslo_middleware/tests/test_correlation_id.py
+++ b/oslo_middleware/tests/test_correlation_id.py
@@ -13,11 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
-import uuid
-
+import fixtures
import mock
from oslotest import base as test_base
-from oslotest import moxstubout
from oslo_middleware import correlation_id
@@ -26,7 +24,6 @@ class CorrelationIdTest(test_base.BaseTestCase):
def setUp(self):
super(CorrelationIdTest, self).setUp()
- self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
def test_process_request(self):
app = mock.Mock()
@@ -35,7 +32,7 @@ class CorrelationIdTest(test_base.BaseTestCase):
mock_uuid4 = mock.Mock()
mock_uuid4.return_value = "fake_uuid"
- self.stubs.Set(uuid, 'uuid4', mock_uuid4)
+ self.useFixture(fixtures.MockPatch('uuid.uuid4', mock_uuid4))
middleware = correlation_id.CorrelationId(app)
middleware(req)