summaryrefslogtreecommitdiff
path: root/tests/unittests/helpers.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-02-24 09:07:53 -0500
committerScott Moser <smoser@ubuntu.com>2015-02-24 09:07:53 -0500
commit3be2a3aaf66601f1218676050f08010c5465ef7e (patch)
treedc7bb2055c7335094e12f73653a5d0d173293e04 /tests/unittests/helpers.py
parent9ab6bbab42ffb5cadbe0afb36aa6967ed94459c3 (diff)
parent14d75254351009087efb5baa5cef808c5ef43e17 (diff)
downloadvyos-cloud-init-3be2a3aaf66601f1218676050f08010c5465ef7e.tar.gz
vyos-cloud-init-3be2a3aaf66601f1218676050f08010c5465ef7e.zip
merge from trunk
Diffstat (limited to 'tests/unittests/helpers.py')
-rw-r--r--tests/unittests/helpers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unittests/helpers.py b/tests/unittests/helpers.py
index ce77af93..7516bd02 100644
--- a/tests/unittests/helpers.py
+++ b/tests/unittests/helpers.py
@@ -287,10 +287,11 @@ def populate_dir(path, files):
if not os.path.exists(path):
os.makedirs(path)
for (name, content) in files.items():
- with open(os.path.join(path, name), "w") as fp:
- fp.write(content)
+ with open(os.path.join(path, name), "wb") as fp:
+ fp.write(content.encode('utf-8'))
fp.close()
+
try:
skipIf = unittest.skipIf
except AttributeError: