aboutsummaryrefslogtreecommitdiffstats
path: root/tests/option_tests.py
blob: 06f048a4a72e52180c8ba18845a89a3e759304aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python

import unittest

from sos.plugins import Plugin

class GlobalOptionTest(unittest.TestCase):

    def setUp(self):
        self.commons = {
            'global_plugin_options': {
                'test_option': 'foobar',
            },
        }
        self.plugin = Plugin(self.commons)

    def test_simple_lookup(self):
        self.assertEquals(self.plugin.getOption('test_option'), 'foobar')

    def test_multi_lookup(self):
        self.assertEquals(self.plugin.getOption(('not_there', 'test_option')), 'foobar')

if __name__ == "__main__":
    unittest.main()