summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler/test_handler_yum_add_repo.py
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2017-04-27 14:31:48 -0600
committerScott Moser <smoser@brickies.net>2017-05-16 16:19:29 -0400
commit6edf0c72ce11e64627d3db6a0c4fd74a81039ed4 (patch)
treee0c41413f63e8cd9589a45f9ac2406bf5e09d9ba /tests/unittests/test_handler/test_handler_yum_add_repo.py
parent4bcc947301bedc5ebf430cfaf6e4597bfb174aa7 (diff)
downloadvyos-cloud-init-6edf0c72ce11e64627d3db6a0c4fd74a81039ed4.tar.gz
vyos-cloud-init-6edf0c72ce11e64627d3db6a0c4fd74a81039ed4.zip
unittests: fix unittests run on centos
Apt related tests were broken when running on centos becasue apt is not available. This fixes the unit test, with a small re-work of apt_configure. Also in 'tox -e centos6' only run nose on tests/unittests as tests/ also contain integration tests that should not be run.
Diffstat (limited to 'tests/unittests/test_handler/test_handler_yum_add_repo.py')
-rw-r--r--tests/unittests/test_handler/test_handler_yum_add_repo.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unittests/test_handler/test_handler_yum_add_repo.py b/tests/unittests/test_handler/test_handler_yum_add_repo.py
index 4815bdb6..c4396df5 100644
--- a/tests/unittests/test_handler/test_handler_yum_add_repo.py
+++ b/tests/unittests/test_handler/test_handler_yum_add_repo.py
@@ -72,7 +72,7 @@ class TestConfig(helpers.FilesystemMockingTestCase):
}
for section in expected:
self.assertTrue(parser.has_section(section),
- "Contains section {}".format(section))
+ "Contains section {0}".format(section))
for k, v in expected[section].items():
self.assertEqual(parser.get(section, k), v)
@@ -109,7 +109,7 @@ class TestConfig(helpers.FilesystemMockingTestCase):
}
for section in expected:
self.assertTrue(parser.has_section(section),
- "Contains section {}".format(section))
+ "Contains section {0}".format(section))
for k, v in expected[section].items():
self.assertEqual(parser.get(section, k), v)