summaryrefslogtreecommitdiff
path: root/tests/unittests
diff options
context:
space:
mode:
authorNate House nathan.house@rackspace.com <>2014-02-03 15:58:43 -0600
committerNate House nathan.house@rackspace.com <>2014-02-03 15:58:43 -0600
commit4a0e460f18d8cbf2651286565efec1f00cbb20cd (patch)
tree4ec27f92f3ca45da9b951b4bf501dcf49c0a21f4 /tests/unittests
parentb997a8cab8b3b10f9be7e915a5ab4c2cc91effb8 (diff)
downloadvyos-cloud-init-4a0e460f18d8cbf2651286565efec1f00cbb20cd.tar.gz
vyos-cloud-init-4a0e460f18d8cbf2651286565efec1f00cbb20cd.zip
Update yum unittest
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/test_handler/test_handler_yum_add_repo.py7
1 files changed, 5 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 8df592f9..ddf0ef9c 100644
--- a/tests/unittests/test_handler/test_handler_yum_add_repo.py
+++ b/tests/unittests/test_handler/test_handler_yum_add_repo.py
@@ -2,6 +2,7 @@ from cloudinit import helpers
from cloudinit import util
from cloudinit.config import cc_yum_add_repo
+from cloudinit.distros import rhel
from tests.unittests import helpers
@@ -18,6 +19,8 @@ class TestConfig(helpers.FilesystemMockingTestCase):
def setUp(self):
super(TestConfig, self).setUp()
self.tmp = self.makeDir(prefix="unittest_")
+ self.cloud = type('', (), {})()
+ self.cloud.distro = rhel.Distro('test', {}, None)
def test_bad_config(self):
cfg = {
@@ -34,7 +37,7 @@ class TestConfig(helpers.FilesystemMockingTestCase):
},
}
self.patchUtils(self.tmp)
- cc_yum_add_repo.handle('yum_add_repo', cfg, None, LOG, [])
+ cc_yum_add_repo.handle('yum_add_repo', cfg, self.cloud, LOG, [])
self.assertRaises(IOError, util.load_file,
"/etc/yum.repos.d/epel_testing.repo")
@@ -52,7 +55,7 @@ class TestConfig(helpers.FilesystemMockingTestCase):
},
}
self.patchUtils(self.tmp)
- cc_yum_add_repo.handle('yum_add_repo', cfg, None, LOG, [])
+ cc_yum_add_repo.handle('yum_add_repo', cfg, self.cloud, LOG, [])
contents = util.load_file("/etc/yum.repos.d/epel_testing.repo")
contents = configobj.ConfigObj(StringIO(contents))
expected = {