summaryrefslogtreecommitdiff
path: root/tests/unittests/test_distros/test_is_excluded.py
blob: 53a4445c1290ae68dd87c54f0048a462e5513ebe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)