diff --git a/zaqar/tests/unit/transport/wsgi/v1/test_home.py b/zaqar/tests/unit/transport/wsgi/v1/test_home.py index d21eee9e1..0bc5fb63c 100644 --- a/zaqar/tests/unit/transport/wsgi/v1/test_home.py +++ b/zaqar/tests/unit/transport/wsgi/v1/test_home.py @@ -14,7 +14,7 @@ import falcon from oslo_serialization import jsonutils -import six.moves.urllib.parse as urlparse +from urllib import parse as urlparse from zaqar.tests.unit.transport.wsgi import base diff --git a/zaqar/tests/unit/transport/wsgi/v1/test_messages.py b/zaqar/tests/unit/transport/wsgi/v1/test_messages.py index 7f59027e8..b5dd12adb 100644 --- a/zaqar/tests/unit/transport/wsgi/v1/test_messages.py +++ b/zaqar/tests/unit/transport/wsgi/v1/test_messages.py @@ -21,7 +21,6 @@ import falcon from oslo_serialization import jsonutils from oslo_utils import timeutils from oslo_utils import uuidutils -import six from testtools import matchers from zaqar import tests as testing @@ -87,7 +86,7 @@ class TestMessagesMongoDB(base.V1Base): msg_ids = self._get_msg_ids(self.srmock.headers_dict) self.assertEqual(len(sample_messages), len(msg_ids)) - expected_resources = [six.text_type(self.messages_path + '/' + id) + expected_resources = [str(self.messages_path + '/' + id) for id in msg_ids] self.assertEqual(expected_resources, result_doc['resources']) @@ -189,9 +188,6 @@ class TestMessagesMongoDB(base.V1Base): path = self.url_prefix + u'/queues/non-ascii-n\u0153me/messages' - if six.PY2: - path = path.encode('utf-8') - self._post_messages(path) self.assertEqual(falcon.HTTP_400, self.srmock.status) diff --git a/zaqar/tests/unit/transport/wsgi/v1/test_pools.py b/zaqar/tests/unit/transport/wsgi/v1/test_pools.py index 3e61c545a..76aa6bb95 100644 --- a/zaqar/tests/unit/transport/wsgi/v1/test_pools.py +++ b/zaqar/tests/unit/transport/wsgi/v1/test_pools.py @@ -31,9 +31,9 @@ def pool(test, name, weight, uri, options={}): :param test: Must expose simulate_* methods :param name: Name for this pool - :type name: six.text_type + :type name: str :type weight: int - :type uri: six.text_type + :type uri: str :type options: dict :returns: (name, weight, uri, options) :rtype: see above @@ -61,7 +61,7 @@ def pools(test, count, uri): :param count: Number of pools to create :type count: int :returns: (paths, weights, uris, options) - :rtype: ([six.text_type], [int], [six.text_type], [dict]) + :rtype: ([str], [int], [str], [dict]) """ mongo_url = uri base = test.url_prefix + '/pools/' diff --git a/zaqar/tests/unit/transport/wsgi/v1/test_queue_lifecycle.py b/zaqar/tests/unit/transport/wsgi/v1/test_queue_lifecycle.py index 8b4bcbe0a..5c469ae15 100644 --- a/zaqar/tests/unit/transport/wsgi/v1/test_queue_lifecycle.py +++ b/zaqar/tests/unit/transport/wsgi/v1/test_queue_lifecycle.py @@ -17,7 +17,6 @@ from unittest import mock import ddt import falcon from oslo_serialization import jsonutils -import six from zaqar.storage import errors as storage_errors from zaqar import tests as testing @@ -148,9 +147,6 @@ class TestQueueLifecycleMongoDB(base.V1Base): for uri, enc in test_params: uri = self.url_prefix + uri - if six.PY2: - uri = uri.encode(enc) - self.simulate_put(uri) self.assertEqual(falcon.HTTP_400, self.srmock.status) diff --git a/zaqar/tests/unit/transport/wsgi/v1_1/test_home.py b/zaqar/tests/unit/transport/wsgi/v1_1/test_home.py index 428e329d9..15c0614cc 100644 --- a/zaqar/tests/unit/transport/wsgi/v1_1/test_home.py +++ b/zaqar/tests/unit/transport/wsgi/v1_1/test_home.py @@ -16,7 +16,7 @@ import falcon from oslo_serialization import jsonutils from oslo_utils import uuidutils -import six.moves.urllib.parse as urlparse +from urllib import parse as urlparse from zaqar.tests.unit.transport.wsgi import base diff --git a/zaqar/tests/unit/transport/wsgi/v1_1/test_messages.py b/zaqar/tests/unit/transport/wsgi/v1_1/test_messages.py index af847e36b..f0edc46b4 100644 --- a/zaqar/tests/unit/transport/wsgi/v1_1/test_messages.py +++ b/zaqar/tests/unit/transport/wsgi/v1_1/test_messages.py @@ -21,7 +21,6 @@ import ddt import falcon from oslo_serialization import jsonutils from oslo_utils import timeutils -import six from testtools import matchers from zaqar import tests as testing @@ -103,7 +102,7 @@ class TestMessagesMongoDB(base.V1_1Base): msg_ids = self._get_msg_ids(self.srmock.headers_dict) self.assertEqual(len(sample_messages), len(msg_ids)) - expected_resources = [six.text_type(self.messages_path + '/' + id) + expected_resources = [str(self.messages_path + '/' + id) for id in msg_ids] self.assertEqual(expected_resources, result_doc['resources']) @@ -231,9 +230,6 @@ class TestMessagesMongoDB(base.V1_1Base): path = self.url_prefix + u'/queues/non-ascii-n\u0153me/messages' - if six.PY2: - path = path.encode('utf-8') - self._post_messages(path) self.assertEqual(falcon.HTTP_400, self.srmock.status) diff --git a/zaqar/tests/unit/transport/wsgi/v1_1/test_queue_lifecycle.py b/zaqar/tests/unit/transport/wsgi/v1_1/test_queue_lifecycle.py index c72d84178..67d0d077b 100644 --- a/zaqar/tests/unit/transport/wsgi/v1_1/test_queue_lifecycle.py +++ b/zaqar/tests/unit/transport/wsgi/v1_1/test_queue_lifecycle.py @@ -19,7 +19,6 @@ import ddt import falcon from oslo_serialization import jsonutils from oslo_utils import uuidutils -import six from zaqar.storage import errors as storage_errors from zaqar import tests as testing @@ -141,9 +140,6 @@ class TestQueueLifecycleMongoDB(base.V1_1Base): for uri, enc in test_params: uri = self.url_prefix + uri - if six.PY2: - uri = uri.encode(enc) - self.simulate_put(uri, headers=self.headers) self.assertEqual(falcon.HTTP_400, self.srmock.status) diff --git a/zaqar/tests/unit/transport/wsgi/v2_0/test_flavors_new.py b/zaqar/tests/unit/transport/wsgi/v2_0/test_flavors_new.py index 972070dbb..6546631ad 100644 --- a/zaqar/tests/unit/transport/wsgi/v2_0/test_flavors_new.py +++ b/zaqar/tests/unit/transport/wsgi/v2_0/test_flavors_new.py @@ -31,8 +31,8 @@ def flavor(test, name, pool_list): :param test: Must expose simulate_* methods :param name: Name for this flavor - :type name: six.text_type - :type pool: six.text_type + :type name: str + :type pool: str :returns: (name, uri, capabilities) :rtype: see above @@ -60,7 +60,7 @@ def flavors(test, count): :param count: Number of pools to create :type count: int :returns: (paths, pool_list capabilities) - :rtype: ([six.text_type], [six.text_type], [dict]) + :rtype: ([str], [str], [dict]) """ diff --git a/zaqar/tests/unit/transport/wsgi/v2_0/test_home.py b/zaqar/tests/unit/transport/wsgi/v2_0/test_home.py index e12e51994..123ec7986 100644 --- a/zaqar/tests/unit/transport/wsgi/v2_0/test_home.py +++ b/zaqar/tests/unit/transport/wsgi/v2_0/test_home.py @@ -16,7 +16,7 @@ import falcon from oslo_serialization import jsonutils from oslo_utils import uuidutils -import six.moves.urllib.parse as urlparse +from urllib import parse as urlparse from zaqar.tests.unit.transport.wsgi import base diff --git a/zaqar/tests/unit/transport/wsgi/v2_0/test_messages.py b/zaqar/tests/unit/transport/wsgi/v2_0/test_messages.py index 659969162..0b353c37f 100644 --- a/zaqar/tests/unit/transport/wsgi/v2_0/test_messages.py +++ b/zaqar/tests/unit/transport/wsgi/v2_0/test_messages.py @@ -21,7 +21,6 @@ import falcon from oslo_serialization import jsonutils from oslo_utils import timeutils from oslo_utils import uuidutils -import six from testtools import matchers from zaqar import tests as testing @@ -117,7 +116,7 @@ class TestMessagesMongoDB(base.V2Base): msg_ids = self._get_msg_ids(self.srmock.headers_dict) self.assertEqual(len(sample_messages), len(msg_ids)) - expected_resources = [six.text_type(self.messages_path + '/' + id) + expected_resources = [str(self.messages_path + '/' + id) for id in msg_ids] self.assertEqual(expected_resources, result_doc['resources']) @@ -261,9 +260,6 @@ class TestMessagesMongoDB(base.V2Base): path = self.url_prefix + u'/queues/non-ascii-n\u0153me/messages' - if six.PY2: - path = path.encode('utf-8') - self._post_messages(path) self.assertEqual(falcon.HTTP_400, self.srmock.status) diff --git a/zaqar/tests/unit/transport/wsgi/v2_0/test_pools_new.py b/zaqar/tests/unit/transport/wsgi/v2_0/test_pools_new.py index 9b1b1083a..dc9b86c34 100644 --- a/zaqar/tests/unit/transport/wsgi/v2_0/test_pools_new.py +++ b/zaqar/tests/unit/transport/wsgi/v2_0/test_pools_new.py @@ -31,9 +31,9 @@ def pool(test, name, weight, uri, flavor=None, options={}): :param test: Must expose simulate_* methods :param name: Name for this pool - :type name: six.text_type + :type name: str :type weight: int - :type uri: six.text_type + :type uri: str :type options: dict :returns: (name, weight, uri, options) :rtype: see above @@ -62,7 +62,7 @@ def pools(test, count, uri, flavor): :param count: Number of pools to create :type count: int :returns: (paths, weights, uris, options) - :rtype: ([six.text_type], [int], [six.text_type], [dict]) + :rtype: ([str], [int], [str], [dict]) """ mongo_url = uri base = test.url_prefix + '/pools/' diff --git a/zaqar/tests/unit/transport/wsgi/v2_0/test_queue_lifecycle.py b/zaqar/tests/unit/transport/wsgi/v2_0/test_queue_lifecycle.py index 13a7da162..5e771c2e8 100644 --- a/zaqar/tests/unit/transport/wsgi/v2_0/test_queue_lifecycle.py +++ b/zaqar/tests/unit/transport/wsgi/v2_0/test_queue_lifecycle.py @@ -19,7 +19,6 @@ import ddt import falcon from oslo_serialization import jsonutils from oslo_utils import uuidutils -import six from zaqar.storage import errors as storage_errors from zaqar import tests as testing @@ -216,9 +215,6 @@ class TestQueueLifecycleMongoDB(base.V2Base): for uri, enc in test_params: uri = self.url_prefix + uri - if six.PY2: - uri = uri.encode(enc) - self.simulate_put(uri, headers=self.headers) self.assertEqual(falcon.HTTP_400, self.srmock.status) diff --git a/zaqar/tests/unit/transport/wsgi/v2_0/test_topic_lifecycle.py b/zaqar/tests/unit/transport/wsgi/v2_0/test_topic_lifecycle.py index de4c90c46..b5ad74991 100644 --- a/zaqar/tests/unit/transport/wsgi/v2_0/test_topic_lifecycle.py +++ b/zaqar/tests/unit/transport/wsgi/v2_0/test_topic_lifecycle.py @@ -19,7 +19,6 @@ import ddt import falcon from oslo_serialization import jsonutils from oslo_utils import uuidutils -import six from zaqar.storage import errors as storage_errors from zaqar import tests as testing @@ -208,9 +207,6 @@ class TestTopicLifecycleMongoDB(base.V2Base): for uri, enc in test_params: uri = self.url_prefix + uri - if six.PY2: - uri = uri.encode(enc) - self.simulate_put(uri, headers=self.headers) self.assertEqual(falcon.HTTP_400, self.srmock.status)