Drop usage of six
Because this plugin no longer supports python 2, six is no longer necessary. Change-Id: I028bba43e93193b2f95eb9a196d0ea2a830f1b30
This commit is contained in:
parent
d6f7287947
commit
4b24afdead
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import six
|
||||
import io
|
||||
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import data_utils
|
||||
@ -277,7 +277,7 @@ class ImageProjectAdminTests(rbac_base.ImageV2RbacImageTest,
|
||||
@decorators.idempotent_id('947f1ae1-c5b6-4552-89e3-1078ca722be4')
|
||||
def test_upload_image(self):
|
||||
file_contents = data_utils.random_bytes()
|
||||
image_data = six.BytesIO(file_contents)
|
||||
image_data = io.BytesIO(file_contents)
|
||||
|
||||
project_id = self.persona.credentials.project_id
|
||||
project_client = self.setup_user_client(project_id=project_id)
|
||||
@ -692,7 +692,7 @@ class ImageProjectAdminTests(rbac_base.ImageV2RbacImageTest,
|
||||
project_id = self.persona.credentials.project_id
|
||||
project_client = self.setup_user_client(project_id=project_id)
|
||||
file_contents = data_utils.random_bytes()
|
||||
image_data = six.BytesIO(file_contents)
|
||||
image_data = io.BytesIO(file_contents)
|
||||
|
||||
image = project_client.image_client_v2.create_image(
|
||||
**self.image(visibility='private'))
|
||||
@ -770,7 +770,7 @@ class ImageProjectAdminTests(rbac_base.ImageV2RbacImageTest,
|
||||
project_id = self.persona.credentials.project_id
|
||||
project_client = self.setup_user_client(project_id=project_id)
|
||||
file_contents = data_utils.random_bytes()
|
||||
image_data = six.BytesIO(file_contents)
|
||||
image_data = io.BytesIO(file_contents)
|
||||
|
||||
image = project_client.image_client_v2.create_image(
|
||||
**self.image(visibility='private'))
|
||||
|
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import six
|
||||
import io
|
||||
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import data_utils
|
||||
@ -250,7 +250,7 @@ class ImagesProjectMemberTests(rbac_base.ImageV2RbacImageTest,
|
||||
@decorators.idempotent_id('bd5845dc-d96b-4d83-a8da-7978bd91ddc1')
|
||||
def test_upload_image(self):
|
||||
file_contents = data_utils.random_bytes()
|
||||
image_data = six.BytesIO(file_contents)
|
||||
image_data = io.BytesIO(file_contents)
|
||||
|
||||
project_id = self.persona.credentials.project_id
|
||||
project_client = self.setup_user_client(project_id=project_id)
|
||||
@ -595,7 +595,7 @@ class ImagesProjectMemberTests(rbac_base.ImageV2RbacImageTest,
|
||||
project_id = self.persona.credentials.project_id
|
||||
project_client = self.setup_user_client(project_id=project_id)
|
||||
file_contents = data_utils.random_bytes()
|
||||
image_data = six.BytesIO(file_contents)
|
||||
image_data = io.BytesIO(file_contents)
|
||||
|
||||
# Create a private image in the persona user's project and make sure
|
||||
# the persona user can deactivate it.
|
||||
@ -675,7 +675,7 @@ class ImagesProjectMemberTests(rbac_base.ImageV2RbacImageTest,
|
||||
project_id = self.persona.credentials.project_id
|
||||
project_client = self.setup_user_client(project_id=project_id)
|
||||
file_contents = data_utils.random_bytes()
|
||||
image_data = six.BytesIO(file_contents)
|
||||
image_data = io.BytesIO(file_contents)
|
||||
|
||||
# Create a private image within the persona user's project and make
|
||||
# sure we can reactivate it.
|
||||
|
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import six
|
||||
import io
|
||||
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import data_utils
|
||||
@ -134,7 +134,7 @@ class ImagesProjectReaderTests(
|
||||
@decorators.idempotent_id('b7ac2883-f569-4032-a35b-a79ef1277582')
|
||||
def test_upload_image(self):
|
||||
file_contents = data_utils.random_bytes()
|
||||
image_data = six.BytesIO(file_contents)
|
||||
image_data = io.BytesIO(file_contents)
|
||||
|
||||
project_id = self.persona.credentials.project_id
|
||||
project_client = self.setup_user_client(project_id=project_id)
|
||||
@ -445,7 +445,7 @@ class ImagesProjectReaderTests(
|
||||
project_id = self.persona.credentials.project_id
|
||||
project_client = self.setup_user_client(project_id=project_id)
|
||||
file_contents = data_utils.random_bytes()
|
||||
image_data = six.BytesIO(file_contents)
|
||||
image_data = io.BytesIO(file_contents)
|
||||
|
||||
# Create a new private image in the persona user's project.
|
||||
image = project_client.image_client_v2.create_image(
|
||||
@ -522,7 +522,7 @@ class ImagesProjectReaderTests(
|
||||
project_id = self.persona.credentials.project_id
|
||||
project_client = self.setup_user_client(project_id=project_id)
|
||||
file_contents = data_utils.random_bytes()
|
||||
image_data = six.BytesIO(file_contents)
|
||||
image_data = io.BytesIO(file_contents)
|
||||
|
||||
# Create a private image in the persona user's project.
|
||||
image = project_client.image_client_v2.create_image(
|
||||
|
@ -4,6 +4,5 @@
|
||||
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
oslo.config>=5.1.0 # Apache-2.0
|
||||
six>=1.10.0 # MIT
|
||||
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
||||
tempest>=17.1.0 # Apache-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user