Merge "[Part6] Remove six"
This commit is contained in:
commit
641465f98e
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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/'
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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])
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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/'
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue