diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-01-21 18:02:42 -0500 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2020-01-21 16:02:42 -0700 |
commit | bb71a9d08d25193836eda91c328760305285574e (patch) | |
tree | 50a1f2f4a61e04255c5a8129e7a2a26d9d4cecd4 /tests/unittests/test_handler | |
parent | 8c4fd886931abcf2cc8627a47463907d655b35c3 (diff) | |
download | vyos-cloud-init-bb71a9d08d25193836eda91c328760305285574e.tar.gz vyos-cloud-init-bb71a9d08d25193836eda91c328760305285574e.zip |
Drop most of the remaining use of six (#179)
Diffstat (limited to 'tests/unittests/test_handler')
-rw-r--r-- | tests/unittests/test_handler/test_handler_chef.py | 3 | ||||
-rw-r--r-- | tests/unittests/test_handler/test_handler_write_files.py | 15 |
2 files changed, 8 insertions, 10 deletions
diff --git a/tests/unittests/test_handler/test_handler_chef.py b/tests/unittests/test_handler/test_handler_chef.py index f4311268..2dab3a54 100644 --- a/tests/unittests/test_handler/test_handler_chef.py +++ b/tests/unittests/test_handler/test_handler_chef.py @@ -4,7 +4,6 @@ import httpretty import json import logging import os -import six from cloudinit import cloud from cloudinit.config import cc_chef @@ -178,7 +177,7 @@ class TestChef(FilesystemMockingTestCase): continue # the value from the cfg overrides that in the default val = cfg['chef'].get(k, v) - if isinstance(val, six.string_types): + if isinstance(val, str): self.assertIn(val, c) c = util.load_file(cc_chef.CHEF_FB_PATH) self.assertEqual({}, json.loads(c)) diff --git a/tests/unittests/test_handler/test_handler_write_files.py b/tests/unittests/test_handler/test_handler_write_files.py index bc8756ca..ed0a4da2 100644 --- a/tests/unittests/test_handler/test_handler_write_files.py +++ b/tests/unittests/test_handler/test_handler_write_files.py @@ -1,17 +1,16 @@ # This file is part of cloud-init. See LICENSE file for license information. -from cloudinit.config.cc_write_files import write_files, decode_perms -from cloudinit import log as logging -from cloudinit import util - -from cloudinit.tests.helpers import CiTestCase, FilesystemMockingTestCase - import base64 import gzip +import io import shutil -import six import tempfile +from cloudinit import log as logging +from cloudinit import util +from cloudinit.config.cc_write_files import write_files, decode_perms +from cloudinit.tests.helpers import CiTestCase, FilesystemMockingTestCase + LOG = logging.getLogger(__name__) YAML_TEXT = """ @@ -138,7 +137,7 @@ class TestDecodePerms(CiTestCase): def _gzip_bytes(data): - buf = six.BytesIO() + buf = io.BytesIO() fp = None try: fp = gzip.GzipFile(fileobj=buf, mode="wb") |