Remove six
Change-Id: I1c9dd70d2d3319ad9012620fe8478316f6a940d2
This commit is contained in:
parent
9043347888
commit
06439d33a5
@ -3,7 +3,6 @@
|
|||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||||
six>=1.10.0 # MIT
|
|
||||||
oslo.utils>=3.33.0 # Apache-2.0
|
oslo.utils>=3.33.0 # Apache-2.0
|
||||||
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
||||||
oslo.config>=5.2.0 # Apache-2.0
|
oslo.config>=5.2.0 # Apache-2.0
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
import contextlib
|
import contextlib
|
||||||
|
|
||||||
import docker
|
import docker
|
||||||
from six.moves.urllib import parse
|
|
||||||
from tempest.common import credentials_factory as common_creds
|
from tempest.common import credentials_factory as common_creds
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common import api_version_utils
|
from tempest.lib.common import api_version_utils
|
||||||
@ -25,6 +24,7 @@ from tempest.lib.services.network import subnetpools_client
|
|||||||
from tempest.lib.services.network import subnets_client
|
from tempest.lib.services.network import subnets_client
|
||||||
from tempest.lib.services.volume.v3 import volumes_client
|
from tempest.lib.services.volume.v3 import volumes_client
|
||||||
from tempest import manager
|
from tempest import manager
|
||||||
|
from urllib import parse
|
||||||
|
|
||||||
from zun_tempest_plugin.tests.tempest.api.models import capsule_model
|
from zun_tempest_plugin.tests.tempest.api.models import capsule_model
|
||||||
from zun_tempest_plugin.tests.tempest.api.models import container_model
|
from zun_tempest_plugin.tests.tempest.api.models import container_model
|
||||||
|
@ -19,7 +19,6 @@ import types
|
|||||||
|
|
||||||
from oslo_serialization import jsonutils as json
|
from oslo_serialization import jsonutils as json
|
||||||
from oslo_utils import encodeutils
|
from oslo_utils import encodeutils
|
||||||
import six
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
@ -140,8 +139,8 @@ class TestContainer(base.BaseZunTest):
|
|||||||
# returns generator [1]. These lines
|
# returns generator [1]. These lines
|
||||||
# makes image_data readable.
|
# makes image_data readable.
|
||||||
# [1] https://bugs.launchpad.net/zun/+bug/1753080
|
# [1] https://bugs.launchpad.net/zun/+bug/1753080
|
||||||
image_data = six.b('').join(image_data)
|
image_data = ''.encode("latin-1").join(image_data)
|
||||||
image_data = six.BytesIO(image_data)
|
image_data = BytesIO(image_data)
|
||||||
|
|
||||||
image = self.images_client.create_image(
|
image = self.images_client.create_image(
|
||||||
name='cirros', disk_format='raw', container_format='docker')
|
name='cirros', disk_format='raw', container_format='docker')
|
||||||
@ -255,7 +254,7 @@ class TestContainer(base.BaseZunTest):
|
|||||||
network_id = list(container.addresses.keys())[0]
|
network_id = list(container.addresses.keys())[0]
|
||||||
self.assertIn(network_id, container.addresses)
|
self.assertIn(network_id, container.addresses)
|
||||||
for addr in container.addresses[network_id]:
|
for addr in container.addresses[network_id]:
|
||||||
if six.viewitems(address) <= six.viewitems(addr):
|
if address.items() <= addr.items():
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
self.fail('Address %s is not found in container %s.' %
|
self.fail('Address %s is not found in container %s.' %
|
||||||
|
@ -14,7 +14,6 @@ import base64
|
|||||||
import functools
|
import functools
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import six
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common import api_version_utils
|
from tempest.lib.common import api_version_utils
|
||||||
|
|
||||||
@ -57,7 +56,7 @@ def requires_microversion(min_version, max_version='latest', **kwargs):
|
|||||||
|
|
||||||
|
|
||||||
def encode_file_data(data):
|
def encode_file_data(data):
|
||||||
if six.PY3 and isinstance(data, str):
|
if isinstance(data, str):
|
||||||
data = data.encode('utf-8')
|
data = data.encode('utf-8')
|
||||||
return base64.b64encode(data).decode('utf-8')
|
return base64.b64encode(data).decode('utf-8')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user