summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/fakes.py
diff options
context:
space:
mode:
authorsongwenping <songwenping@inspur.com>2020-10-06 14:26:27 +0800
committerroot <songwenping@inspur.com>2020-10-07 02:15:25 +0000
commitc2df9215e19752714e83fcad82c8ae3708f85d7a (patch)
treecfcf7e7041dcb4e4532a645d087140053bc5deca /openstackclient/tests/unit/fakes.py
parent098a3fe2dea70eb16f13b717d62f51a4c890891d (diff)
downloadpython-openstackclient-c2df9215e19752714e83fcad82c8ae3708f85d7a.tar.gz
Remove usage of six
With python3.x, classes can use 'metaclass=' instead of 'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can be replaced by 'items' and 'keys', 'six.moves.urllib.parse' can be replaced by 'urllib.parse', 'six.StringIO' and 'six.moves.cStringIO' can be replaced by 'io.StringIO', 'six.text_type' and 'six.string_type' are just 'str'. Change-Id: I84848c0bf8ab3c36dd821141191e2725e4e3b58b
Diffstat (limited to 'openstackclient/tests/unit/fakes.py')
-rw-r--r--openstackclient/tests/unit/fakes.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/openstackclient/tests/unit/fakes.py b/openstackclient/tests/unit/fakes.py
index e5476f06..00e0c129 100644
--- a/openstackclient/tests/unit/fakes.py
+++ b/openstackclient/tests/unit/fakes.py
@@ -19,7 +19,6 @@ from unittest import mock
from keystoneauth1 import fixture
import requests
-import six
AUTH_TOKEN = "foobar"
@@ -253,7 +252,7 @@ class FakeResponse(requests.Response):
self.headers.update(headers)
self._content = json.dumps(data)
- if not isinstance(self._content, six.binary_type):
+ if not isinstance(self._content, bytes):
self._content = self._content.encode()