diff options
author | gordon chung <gord@live.ca> | 2014-08-13 16:33:46 -0400 |
---|---|---|
committer | gordon chung <gord@live.ca> | 2014-08-13 17:04:36 -0400 |
commit | 717acd59647e068318b1f374ef803c7fa6498623 (patch) | |
tree | b025ed9506a492a577c436dc10d364c9789530ea /tests | |
parent | 29054411b04b8e595856da4d4be5a62de91960b5 (diff) | |
download | oslo-middleware-717acd59647e068318b1f374ef803c7fa6498623.tar.gz |
drop middleware suffix in class names
as discussed in bp, we should drop the middleware suffix in class
names to avoid redundancy.
Change-Id: I60e1e84e817e24be9ad1d31381df95c93f7b7990
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_catch_errors.py | 2 | ||||
-rw-r--r-- | tests/test_correlation_id.py | 8 | ||||
-rw-r--r-- | tests/test_request_id.py | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_catch_errors.py b/tests/test_catch_errors.py index a14789d..9e71f5b 100644 --- a/tests/test_catch_errors.py +++ b/tests/test_catch_errors.py @@ -24,7 +24,7 @@ from oslo.middleware import catch_errors class CatchErrorsTest(test_base.BaseTestCase): def _test_has_request_id(self, application, expected_code=None): - app = catch_errors.CatchErrorsMiddleware(application) + app = catch_errors.CatchErrors(application) req = webob.Request.blank('/test') res = req.get_response(app) self.assertEqual(expected_code, res.status_int) diff --git a/tests/test_correlation_id.py b/tests/test_correlation_id.py index 5248d8f..b927e1d 100644 --- a/tests/test_correlation_id.py +++ b/tests/test_correlation_id.py @@ -22,10 +22,10 @@ from oslotest import moxstubout from oslo.middleware import correlation_id -class CorrelationIdMiddlewareTest(test_base.BaseTestCase): +class CorrelationIdTest(test_base.BaseTestCase): def setUp(self): - super(CorrelationIdMiddlewareTest, self).setUp() + super(CorrelationIdTest, self).setUp() self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs def test_process_request(self): @@ -37,7 +37,7 @@ class CorrelationIdMiddlewareTest(test_base.BaseTestCase): mock_uuid4.return_value = "fake_uuid" self.stubs.Set(uuid, 'uuid4', mock_uuid4) - middleware = correlation_id.CorrelationIdMiddleware(app) + middleware = correlation_id.CorrelationId(app) middleware(req) self.assertEqual(req.headers.get("X_CORRELATION_ID"), "fake_uuid") @@ -47,7 +47,7 @@ class CorrelationIdMiddlewareTest(test_base.BaseTestCase): req = mock.Mock() req.headers = {"X_CORRELATION_ID": "correlation_id"} - middleware = correlation_id.CorrelationIdMiddleware(app) + middleware = correlation_id.CorrelationId(app) middleware(req) self.assertEqual(req.headers.get("X_CORRELATION_ID"), "correlation_id") diff --git a/tests/test_request_id.py b/tests/test_request_id.py index c43229b..549d7be 100644 --- a/tests/test_request_id.py +++ b/tests/test_request_id.py @@ -28,7 +28,7 @@ class RequestIdTest(test_base.BaseTestCase): def application(req): return req.environ[request_id.ENV_REQUEST_ID] - app = request_id.RequestIdMiddleware(application) + app = request_id.RequestId(application) req = webob.Request.blank('/test') res = req.get_response(app) res_req_id = res.headers.get(request_id.HTTP_RESP_HEADER_REQUEST_ID) |