summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Sergeyev <vsergeyev@mirantis.com>2014-04-15 13:05:35 +0300
committerVictor Sergeyev <vsergeyev@mirantis.com>2014-04-15 13:05:35 +0300
commit8452e0f799ed7ac477f2152adce5eb97cdb27607 (patch)
tree2d6b365525e1fadcb11bef065eee9c12c591a4e8
parent9c33362b90002a5500e9a3f243ebac96f24e23ad (diff)
downloadoslo-middleware-8452e0f799ed7ac477f2152adce5eb97cdb27607.tar.gz
Use oslotest instead of common test module
Module openstack.common.test is obsolete, so we should use oslotest library instead of it. Modified tests and common database code, new requirement added. Change-Id: I853e548f11a4c3785eaf75124510a6d789536634
-rw-r--r--tests/unit/middleware/test_catch_errors.py4
-rw-r--r--tests/unit/middleware/test_correlation_id.py4
-rw-r--r--tests/unit/middleware/test_request_id.py4
-rw-r--r--tests/unit/middleware/test_sizelimit.py6
4 files changed, 9 insertions, 9 deletions
diff --git a/tests/unit/middleware/test_catch_errors.py b/tests/unit/middleware/test_catch_errors.py
index 476ae24..f8b4c19 100644
--- a/tests/unit/middleware/test_catch_errors.py
+++ b/tests/unit/middleware/test_catch_errors.py
@@ -14,14 +14,14 @@
# under the License.
import mock
+from oslotest import base as test_base
import webob.dec
import webob.exc
from openstack.common.middleware import catch_errors
-from openstack.common import test
-class CatchErrorsTest(test.BaseTestCase):
+class CatchErrorsTest(test_base.BaseTestCase):
def _test_has_request_id(self, application, expected_code=None):
app = catch_errors.CatchErrorsMiddleware(application)
diff --git a/tests/unit/middleware/test_correlation_id.py b/tests/unit/middleware/test_correlation_id.py
index 15133ce..d94916b 100644
--- a/tests/unit/middleware/test_correlation_id.py
+++ b/tests/unit/middleware/test_correlation_id.py
@@ -16,13 +16,13 @@
import uuid
import mock
+from oslotest import base as test_base
from openstack.common.fixture import moxstubout
from openstack.common.middleware import correlation_id
-from openstack.common import test
-class CorrelationIdMiddlewareTest(test.BaseTestCase):
+class CorrelationIdMiddlewareTest(test_base.BaseTestCase):
def setUp(self):
super(CorrelationIdMiddlewareTest, self).setUp()
diff --git a/tests/unit/middleware/test_request_id.py b/tests/unit/middleware/test_request_id.py
index a8bcd88..0185fda 100644
--- a/tests/unit/middleware/test_request_id.py
+++ b/tests/unit/middleware/test_request_id.py
@@ -14,15 +14,15 @@
# under the License.
+from oslotest import base as test_base
from testtools import matchers
import webob
import webob.dec
from openstack.common.middleware import request_id
-from openstack.common import test
-class RequestIdTest(test.BaseTestCase):
+class RequestIdTest(test_base.BaseTestCase):
def test_generate_request_id(self):
@webob.dec.wsgify
def application(req):
diff --git a/tests/unit/middleware/test_sizelimit.py b/tests/unit/middleware/test_sizelimit.py
index 0b471c3..1bec469 100644
--- a/tests/unit/middleware/test_sizelimit.py
+++ b/tests/unit/middleware/test_sizelimit.py
@@ -12,15 +12,15 @@
# License for the specific language governing permissions and limitations
# under the License.
+from oslotest import base as test_base
import six
import webob
from openstack.common.fixture import config
from openstack.common.middleware import sizelimit
-from openstack.common import test
-class TestLimitingReader(test.BaseTestCase):
+class TestLimitingReader(test_base.BaseTestCase):
def test_limiting_reader(self):
BYTES = 1024
@@ -66,7 +66,7 @@ class TestLimitingReader(test.BaseTestCase):
_consume_all_read)
-class TestRequestBodySizeLimiter(test.BaseTestCase):
+class TestRequestBodySizeLimiter(test_base.BaseTestCase):
def setUp(self):
super(TestRequestBodySizeLimiter, self).setUp()