summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2015-01-21 15:35:56 -0500
committerBarry Warsaw <barry@python.org>2015-01-21 15:35:56 -0500
commitcccc0ff012d2e7b5c238609b22cc064b519e54a5 (patch)
tree1ca463be706ede0f0b3f0d967f67de79d13e5793 /tests/unittests/test_handler
parent463d626ba53e54160f350d84831e1877b24f4024 (diff)
downloadvyos-cloud-init-cccc0ff012d2e7b5c238609b22cc064b519e54a5.tar.gz
vyos-cloud-init-cccc0ff012d2e7b5c238609b22cc064b519e54a5.zip
Fix file modes to be Python 2/3 compatible.
Diffstat (limited to 'tests/unittests/test_handler')
-rw-r--r--tests/unittests/test_handler/test_handler_ca_certs.py2
-rw-r--r--tests/unittests/test_handler/test_handler_growpart.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/unittests/test_handler/test_handler_ca_certs.py b/tests/unittests/test_handler/test_handler_ca_certs.py
index 0558023a..75df807e 100644
--- a/tests/unittests/test_handler/test_handler_ca_certs.py
+++ b/tests/unittests/test_handler/test_handler_ca_certs.py
@@ -150,7 +150,7 @@ class TestAddCaCerts(MockerTestCase):
mock_load = self.mocker.replace(util.load_file, passthrough=False)
mock_write("/usr/share/ca-certificates/cloud-init-ca-certs.crt",
- cert, mode=0644)
+ cert, mode=0o644)
mock_load("/etc/ca-certificates.conf")
self.mocker.result(ca_certs_content)
diff --git a/tests/unittests/test_handler/test_handler_growpart.py b/tests/unittests/test_handler/test_handler_growpart.py
index 5d0636d1..3056320d 100644
--- a/tests/unittests/test_handler/test_handler_growpart.py
+++ b/tests/unittests/test_handler/test_handler_growpart.py
@@ -145,7 +145,7 @@ class TestResize(MockerTestCase):
# this patches out devent2dev, os.stat, and device_part_info
# so in the end, doesn't test a lot
devs = ["/dev/XXda1", "/dev/YYda2"]
- devstat_ret = Bunch(st_mode=25008, st_ino=6078, st_dev=5L,
+ devstat_ret = Bunch(st_mode=25008, st_ino=6078, st_dev=5,
st_nlink=1, st_uid=0, st_gid=6, st_size=0,
st_atime=0, st_mtime=0, st_ctime=0)
enoent = ["/dev/NOENT"]