diff options
author | Barry Warsaw <barry@python.org> | 2015-01-26 11:14:06 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2015-01-26 11:14:06 -0500 |
commit | 841db73600e3f203243c773109d71ab88d3334bc (patch) | |
tree | 051f44833ae1ec1b31c5f893c6eca8b39e07a83c /tests/unittests/test_util.py | |
parent | 3246c85763d5cdebb3e240fcd5ae29834cbf6299 (diff) | |
download | vyos-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.py | 6 |
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) |