diff options
author | Barry Warsaw <barry@python.org> | 2015-01-21 17:56:53 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2015-01-21 17:56:53 -0500 |
commit | f895cb12141281702b34da18f2384deb64c881e7 (patch) | |
tree | 7a7433752ba1317c370dd3dd815c9ee7331a923b /tests/unittests/test_handler/test_handler_timezone.py | |
parent | a64bb4febc79fcf641f6471d8cc00c74ca915f3d (diff) | |
download | vyos-cloud-init-f895cb12141281702b34da18f2384deb64c881e7.tar.gz vyos-cloud-init-f895cb12141281702b34da18f2384deb64c881e7.zip |
Largely merge lp:~harlowja/cloud-init/py2-3 albeit manually because it seemed
to be behind trunk.
`tox -e py27` passes full test suite. Now to work on replacing mocker.
Diffstat (limited to 'tests/unittests/test_handler/test_handler_timezone.py')
-rw-r--r-- | tests/unittests/test_handler/test_handler_timezone.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unittests/test_handler/test_handler_timezone.py b/tests/unittests/test_handler/test_handler_timezone.py index 874db340..10ea2040 100644 --- a/tests/unittests/test_handler/test_handler_timezone.py +++ b/tests/unittests/test_handler/test_handler_timezone.py @@ -29,7 +29,7 @@ from .. import helpers as t_help from configobj import ConfigObj -from StringIO import StringIO +from six import BytesIO import logging @@ -67,8 +67,8 @@ class TestTimezone(t_help.FilesystemMockingTestCase): cc_timezone.handle('cc_timezone', cfg, cc, LOG, []) - contents = util.load_file('/etc/sysconfig/clock') - n_cfg = ConfigObj(StringIO(contents)) + contents = util.load_file('/etc/sysconfig/clock', decode=False) + n_cfg = ConfigObj(BytesIO(contents)) self.assertEquals({'TIMEZONE': cfg['timezone']}, dict(n_cfg)) contents = util.load_file('/etc/localtime') |