diff options
author | Joshua Harlow <harlowja@gmail.com> | 2016-05-12 14:25:32 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2016-05-12 14:25:32 -0700 |
commit | 78cbc764486060928541b9dee6ce5779e622d1fa (patch) | |
tree | 48a886ea0a9857ce353eebe504048e656e1c6e92 /tests/unittests/test_handler/test_handler_ca_certs.py | |
parent | 690bdce9a73ec6d00b4eebbbca31cc527e7b2fce (diff) | |
parent | 811f7b5b3c4590ee4a16662db37b1f37541d9822 (diff) | |
download | vyos-cloud-init-78cbc764486060928541b9dee6ce5779e622d1fa.tar.gz vyos-cloud-init-78cbc764486060928541b9dee6ce5779e622d1fa.zip |
Enable flake8 and fix a large amount of reported issues
Diffstat (limited to 'tests/unittests/test_handler/test_handler_ca_certs.py')
-rw-r--r-- | tests/unittests/test_handler/test_handler_ca_certs.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/unittests/test_handler/test_handler_ca_certs.py b/tests/unittests/test_handler/test_handler_ca_certs.py index a6b9c0fd..5e771731 100644 --- a/tests/unittests/test_handler/test_handler_ca_certs.py +++ b/tests/unittests/test_handler/test_handler_ca_certs.py @@ -1,8 +1,8 @@ from cloudinit import cloud +from cloudinit.config import cc_ca_certs from cloudinit import helpers from cloudinit import util -from cloudinit.config import cc_ca_certs from ..helpers import TestCase import logging @@ -176,8 +176,7 @@ class TestAddCaCerts(TestCase): mock_write.assert_has_calls([ mock.call("/usr/share/ca-certificates/cloud-init-ca-certs.crt", cert, mode=0o644), - mock.call("/etc/ca-certificates.conf", expected, omode="wb"), - ]) + mock.call("/etc/ca-certificates.conf", expected, omode="wb")]) mock_load.assert_called_once_with("/etc/ca-certificates.conf") def test_single_cert_no_trailing_cr(self): @@ -202,8 +201,7 @@ class TestAddCaCerts(TestCase): mock.call("/etc/ca-certificates.conf", "%s\n%s\n" % (ca_certs_content, "cloud-init-ca-certs.crt"), - omode="wb"), - ]) + omode="wb")]) mock_load.assert_called_once_with("/etc/ca-certificates.conf") @@ -228,8 +226,7 @@ class TestAddCaCerts(TestCase): mock.call("/etc/ca-certificates.conf", "%s\n%s\n" % (ca_certs_content, "cloud-init-ca-certs.crt"), - omode='wb'), - ]) + omode='wb')]) mock_load.assert_called_once_with("/etc/ca-certificates.conf") @@ -264,8 +261,7 @@ class TestRemoveDefaultCaCerts(TestCase): mock_delete.assert_has_calls([ mock.call("/usr/share/ca-certificates/"), - mock.call("/etc/ssl/certs/"), - ]) + mock.call("/etc/ssl/certs/")]) mock_write.assert_called_once_with( "/etc/ca-certificates.conf", "", mode=0o644) |