summaryrefslogtreecommitdiff
path: root/tests/unittests/test_util.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2015-01-26 11:14:06 -0500
committerBarry Warsaw <barry@python.org>2015-01-26 11:14:06 -0500
commit841db73600e3f203243c773109d71ab88d3334bc (patch)
tree051f44833ae1ec1b31c5f893c6eca8b39e07a83c /tests/unittests/test_util.py
parent3246c85763d5cdebb3e240fcd5ae29834cbf6299 (diff)
downloadvyos-cloud-init-841db73600e3f203243c773109d71ab88d3334bc.tar.gz
vyos-cloud-init-841db73600e3f203243c773109d71ab88d3334bc.zip
More test repairs.
Diffstat (limited to 'tests/unittests/test_util.py')
-rw-r--r--tests/unittests/test_util.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py
index b1f5d62c..b0207ace 100644
--- a/tests/unittests/test_util.py
+++ b/tests/unittests/test_util.py
@@ -119,7 +119,7 @@ class TestWriteFile(unittest.TestCase):
# Create file first with basic content
with open(path, "wb") as f:
- f.write("LINE1\n")
+ f.write(b"LINE1\n")
util.write_file(path, contents, omode="a")
self.assertTrue(os.path.exists(path))
@@ -194,7 +194,7 @@ class TestDeleteDirContents(unittest.TestCase):
os.mkdir(os.path.join(self.tmp, "new_dir"))
f_name = os.path.join(self.tmp, "new_dir", "new_file.txt")
with open(f_name, "wb") as f:
- f.write("DELETE ME")
+ f.write(b"DELETE ME")
util.delete_dir_contents(self.tmp)
@@ -205,7 +205,7 @@ class TestDeleteDirContents(unittest.TestCase):
file_name = os.path.join(self.tmp, "new_file.txt")
link_name = os.path.join(self.tmp, "new_file_link.txt")
with open(file_name, "wb") as f:
- f.write("DELETE ME")
+ f.write(b"DELETE ME")
os.symlink(file_name, link_name)
util.delete_dir_contents(self.tmp)