summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-01-31 10:15:31 -0500
committerGitHub <noreply@github.com>2020-01-31 10:15:31 -0500
commit1bb1896ec900622e02c1ffb59db4d3f2df4a964d (patch)
treeb1339e806a8682e8fdf8582b83630cf9d20ce04a /tests/unittests/test_datasource
parent0ecbd888c9491176ae41bbfa2b74a05234882000 (diff)
downloadvyos-cloud-init-1bb1896ec900622e02c1ffb59db4d3f2df4a964d.tar.gz
vyos-cloud-init-1bb1896ec900622e02c1ffb59db4d3f2df4a964d.zip
cloudinit: replace "from six import X" imports (except in util.py) (#183)
Diffstat (limited to 'tests/unittests/test_datasource')
-rw-r--r--tests/unittests/test_datasource/test_gce.py2
-rw-r--r--tests/unittests/test_datasource/test_openstack.py8
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py
index e9dd6e60..4afbccff 100644
--- a/tests/unittests/test_datasource/test_gce.py
+++ b/tests/unittests/test_datasource/test_gce.py
@@ -9,9 +9,9 @@ import httpretty
import json
import re
from unittest import mock
+from urllib.parse import urlparse
from base64 import b64encode, b64decode
-from six.moves.urllib_parse import urlparse
from cloudinit import distros
from cloudinit import helpers
diff --git a/tests/unittests/test_datasource/test_openstack.py b/tests/unittests/test_datasource/test_openstack.py
index a731f1ed..f754556f 100644
--- a/tests/unittests/test_datasource/test_openstack.py
+++ b/tests/unittests/test_datasource/test_openstack.py
@@ -8,12 +8,11 @@ import copy
import httpretty as hp
import json
import re
+from io import StringIO
+from urllib.parse import urlparse
from cloudinit.tests import helpers as test_helpers
-from six.moves.urllib.parse import urlparse
-from six import StringIO, text_type
-
from cloudinit import helpers
from cloudinit import settings
from cloudinit.sources import BrokenMetadata, convert_vendordata, UNSET
@@ -569,8 +568,7 @@ class TestMetadataReader(test_helpers.HttprettyTestCase):
'uuid': 'b0fa911b-69d4-4476-bbe2-1c92bff6535c'}
def register(self, path, body=None, status=200):
- content = (body if not isinstance(body, text_type)
- else body.encode('utf-8'))
+ content = body if not isinstance(body, str) else body.encode('utf-8')
hp.register_uri(
hp.GET, self.burl + "openstack" + path, status=status,
body=content)