Remove six from test codes
This removes six from some of the tests code. The other test codes will be updated in per-driver changes. Change-Id: Ib168d5831ce30793b22a33aec85b81103a4150a7
This commit is contained in:
parent
2a18843ab9
commit
3159ce84f2
@ -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): ...
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user