Merge "Remove six from test codes"

This commit is contained in:
Zuul 2024-02-13 07:57:44 +00:00 committed by Gerrit Code Review
commit fa19d4a866
3 changed files with 4 additions and 7 deletions

View File

@ -2,13 +2,12 @@
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
import six
from typing import Any, Optional
CONTEXT_SEPARATOR: str
LOG: Any
class Message(six.text_type):
class Message(str):
def __new__(cls, msgid: Any, msgtext: Optional[Any] = ..., params: Optional[Any] = ..., domain: str = ..., has_contextual_form: bool = ..., has_plural_form: bool = ..., *args: Any): ...
def translation(self, desired_locale: Optional[Any] = ...): ...
def __mod__(self, other: Any): ...

View File

@ -13,12 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Tests for macrosan drivers."""
from collections import UserDict
import os
import socket
from unittest import mock
from six.moves import UserDict
from cinder import exception
from cinder.tests.unit import test
from cinder.volume import configuration as conf

View File

@ -15,6 +15,7 @@
import collections
from unittest import mock
import urllib
from ddt import data
from ddt import ddt
@ -23,8 +24,6 @@ import eventlet
from lxml import etree as ET
from oslo_utils import units
import requests
import six
from six.moves import urllib
from cinder import exception
from cinder.tests.unit import test
@ -613,7 +612,7 @@ class QnapDriverBaseTestCase(test.TestCase):
@staticmethod
def sanitize(params):
sanitized = {_key: str(_value)
for _key, _value in six.iteritems(params)
for _key, _value in params.items()
if _value is not None}
sanitized = utils.create_ordereddict(sanitized)
return urllib.parse.urlencode(sanitized)