Merge "Remove six again"

This commit is contained in:
Zuul 2024-05-09 04:10:07 +00:00 committed by Gerrit Code Review
commit 1625b38ca0
2 changed files with 4 additions and 5 deletions

View File

@ -140,7 +140,7 @@ def encrypt_data(key, data):
# AES algorithm uses block size of 16 bytes = 128 bits, defined in
# algorithms.AES.block_size. Previously, we manually padded this using
# six.int2byte(padding) * padding. Using ``cryptography``, we will
# bytes((padding,)) * padding. Using ``cryptography``, we will
# analogously use hazmat.primitives.padding to pad it to
# the 128-bit block size.
padder = padding.PKCS7(algorithms.AES.block_size).padder()

View File

@ -15,6 +15,7 @@
import base64
import copy
import hashlib
from http import HTTPStatus
import jwt.utils
import logging
import ssl
@ -26,8 +27,6 @@ import webob.dec
import fixtures
from oslo_config import cfg
import six
from six.moves import http_client
import testresources
from keystoneauth1 import exceptions as ksa_exceptions
@ -282,7 +281,7 @@ class BaseExternalOauth2TokenMiddlewareTest(base.BaseAuthTokenTestCase,
self.fake_app(expected_env=self.expected_env), self.conf)
def call(self, middleware, method='GET', path='/', headers=None,
expected_status=http_client.OK,
expected_status=HTTPStatus.OK,
expected_body_string=None, **kwargs):
req = webob.Request.blank(path, **kwargs)
req.method = method
@ -293,7 +292,7 @@ class BaseExternalOauth2TokenMiddlewareTest(base.BaseAuthTokenTestCase,
resp = req.get_response(middleware)
self.assertEqual(expected_status, resp.status_int)
if expected_body_string:
self.assertIn(expected_body_string, six.text_type(resp.body))
self.assertIn(expected_body_string, str(resp.body))
resp.request = req
return resp