diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-05-12 16:43:11 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-05-12 16:43:11 -0400 |
commit | 4ba4df2f00ab1763920280f76e2b4497898858af (patch) | |
tree | f025371acd895680336026ebdff7ffa8a4db25d3 /tests/unittests/test_distros/test_generic.py | |
parent | f6b318947d0be752e7c93708413929802006a66e (diff) | |
download | vyos-cloud-init-4ba4df2f00ab1763920280f76e2b4497898858af.tar.gz vyos-cloud-init-4ba4df2f00ab1763920280f76e2b4497898858af.zip |
run flake8 instead of pyflakes in tox. expect tests/ to pass flake8.
Diffstat (limited to 'tests/unittests/test_distros/test_generic.py')
-rw-r--r-- | tests/unittests/test_distros/test_generic.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unittests/test_distros/test_generic.py b/tests/unittests/test_distros/test_generic.py index 6ed1704c..96fa0811 100644 --- a/tests/unittests/test_distros/test_generic.py +++ b/tests/unittests/test_distros/test_generic.py @@ -87,13 +87,13 @@ class TestGenericDistro(helpers.FilesystemMockingTestCase): rules = 'ALL=(ALL:ALL) ALL' contents = self._write_load_sudoers('harlowja', rules) expected = ['harlowja ALL=(ALL:ALL) ALL'] - self.assertEquals(len(expected), self._count_in(expected, contents)) + self.assertEqual(len(expected), self._count_in(expected, contents)) not_expected = [ 'harlowja A', 'harlowja L', 'harlowja L', ] - self.assertEquals(0, self._count_in(not_expected, contents)) + self.assertEqual(0, self._count_in(not_expected, contents)) def test_sudoers_ensure_rules_list(self): rules = [ @@ -107,13 +107,13 @@ class TestGenericDistro(helpers.FilesystemMockingTestCase): 'harlowja B-ALL=(ALL:ALL) ALL', 'harlowja C-ALL=(ALL:ALL) ALL', ] - self.assertEquals(len(expected), self._count_in(expected, contents)) + self.assertEqual(len(expected), self._count_in(expected, contents)) not_expected = [ 'harlowja A', 'harlowja L', 'harlowja L', ] - self.assertEquals(0, self._count_in(not_expected, contents)) + self.assertEqual(0, self._count_in(not_expected, contents)) def test_sudoers_ensure_new(self): cls = distros.fetch("ubuntu") @@ -136,7 +136,7 @@ class TestGenericDistro(helpers.FilesystemMockingTestCase): self.assertIn("includedir /b", contents) self.assertTrue(os.path.isdir("/b")) self.assertIn("josh", contents) - self.assertEquals(2, contents.count("josh")) + self.assertEqual(2, contents.count("josh")) def test_arch_package_mirror_info_unknown(self): """for an unknown arch, we should get back that with arch 'default'.""" |