summaryrefslogtreecommitdiff
path: root/tests/unittests/test_distros/test_is_excluded.py
diff options
context:
space:
mode:
authorNate House nathan.house@rackspace.com <>2014-02-03 16:53:31 -0600
committerNate House nathan.house@rackspace.com <>2014-02-03 16:53:31 -0600
commit0efeb26736ddae2967c14a9440088594da32070d (patch)
tree2ad1630eb97d9e57e919a463fda73e5323144301 /tests/unittests/test_distros/test_is_excluded.py
parenta9e4009ae7221ea167b3e1083a887564483e0350 (diff)
downloadvyos-cloud-init-0efeb26736ddae2967c14a9440088594da32070d.tar.gz
vyos-cloud-init-0efeb26736ddae2967c14a9440088594da32070d.zip
Added is_excluded tests and updated gentoo init script
Diffstat (limited to 'tests/unittests/test_distros/test_is_excluded.py')
-rw-r--r--tests/unittests/test_distros/test_is_excluded.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unittests/test_distros/test_is_excluded.py b/tests/unittests/test_distros/test_is_excluded.py
new file mode 100644
index 00000000..53a4445c
--- /dev/null
+++ b/tests/unittests/test_distros/test_is_excluded.py
@@ -0,0 +1,15 @@
+from cloudinit.distros import gentoo
+import unittest
+
+
+class TestIsExcluded(unittest.TestCase):
+
+ def setUp(self):
+ self.distro = gentoo.Distro('gentoo', {}, None)
+ self.distro.exclude_modules = ['test-module']
+
+ def test_is_excluded_success(self):
+ self.assertEqual(self.distro.is_excluded('test-module'), True)
+
+ def test_is_excluded_fail(self):
+ self.assertEqual(self.distro.is_excluded('missing'), None)