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_lxd.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_lxd.py')
-rw-r--r-- | tests/unittests/test_handler/test_handler_lxd.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/unittests/test_handler/test_handler_lxd.py b/tests/unittests/test_handler/test_handler_lxd.py index 5f61ba6a..6f90defb 100644 --- a/tests/unittests/test_handler/test_handler_lxd.py +++ b/tests/unittests/test_handler/test_handler_lxd.py @@ -1,6 +1,6 @@ from cloudinit.config import cc_lxd -from cloudinit import (distros, helpers, cloud) from cloudinit.sources import DataSourceNoCloud +from cloudinit import (distros, helpers, cloud) from .. import helpers as t_help import logging @@ -42,11 +42,11 @@ class TestLxd(t_help.TestCase): cc_lxd.handle('cc_lxd', self.lxd_cfg, cc, LOG, []) self.assertTrue(mock_util.which.called) init_call = mock_util.subp.call_args_list[0][0][0] - self.assertEquals(init_call, - ['lxd', 'init', '--auto', - '--network-address=0.0.0.0', - '--storage-backend=zfs', - '--storage-pool=poolname']) + self.assertEqual(init_call, + ['lxd', 'init', '--auto', + '--network-address=0.0.0.0', + '--storage-backend=zfs', + '--storage-pool=poolname']) @mock.patch("cloudinit.config.cc_lxd.util") def test_lxd_install(self, mock_util): @@ -56,7 +56,7 @@ class TestLxd(t_help.TestCase): cc_lxd.handle('cc_lxd', self.lxd_cfg, cc, LOG, []) self.assertTrue(cc.distro.install_packages.called) install_pkg = cc.distro.install_packages.call_args_list[0][0][0] - self.assertEquals(sorted(install_pkg), ['lxd', 'zfs']) + self.assertEqual(sorted(install_pkg), ['lxd', 'zfs']) @mock.patch("cloudinit.config.cc_lxd.util") def test_no_init_does_nothing(self, mock_util): @@ -87,7 +87,7 @@ class TestLxd(t_help.TestCase): "ipv6_netmask": "64", "ipv6_nat": "true", "domain": "lxd"} - self.assertEquals( + self.assertEqual( cc_lxd.bridge_to_debconf(data), {"lxd/setup-bridge": "true", "lxd/bridge-name": "testbr0", @@ -109,7 +109,7 @@ class TestLxd(t_help.TestCase): "ipv6_address": "fd98:9e0:3744::1", "ipv6_netmask": "64", "ipv6_nat": "true"} - self.assertEquals( + self.assertEqual( cc_lxd.bridge_to_debconf(data), {"lxd/setup-bridge": "true", "lxd/bridge-ipv6": "true", @@ -120,7 +120,7 @@ class TestLxd(t_help.TestCase): def test_lxd_debconf_existing(self): data = {"mode": "existing", "name": "testbr0"} - self.assertEquals( + self.assertEqual( cc_lxd.bridge_to_debconf(data), {"lxd/setup-bridge": "false", "lxd/use-existing-bridge": "true", @@ -128,7 +128,7 @@ class TestLxd(t_help.TestCase): def test_lxd_debconf_none(self): data = {"mode": "none"} - self.assertEquals( + self.assertEqual( cc_lxd.bridge_to_debconf(data), {"lxd/setup-bridge": "false", "lxd/bridge-name": ""}) |