mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Teach utils.option to fail so that it can succeed
This commit is contained in:
parent
b18e89fdc3
commit
acdb4d3d85
@ -252,6 +252,14 @@ class UtilsTestCase(TestCase):
|
||||
self.assertTrue(utils.test_mode(Test=True))
|
||||
self.assertTrue(utils.test_mode(tEsT=True))
|
||||
|
||||
def test_option(self):
|
||||
test_two_level_dict = {'foo': {'bar': 'baz'}}
|
||||
|
||||
self.assertDictEqual({'not_found': 'nope'}, utils.option('foo:bar', {'not_found': 'nope'}))
|
||||
self.assertEqual('baz', utils.option('foo:bar', {'not_found': 'nope'}, opts=test_two_level_dict))
|
||||
self.assertEqual('baz', utils.option('foo:bar', {'not_found': 'nope'}, pillar={'master': test_two_level_dict}))
|
||||
self.assertEqual('baz', utils.option('foo:bar', {'not_found': 'nope'}, pillar=test_two_level_dict))
|
||||
|
||||
def test_parse_docstring(self):
|
||||
test_keystone_str = '''Management of Keystone users
|
||||
============================
|
||||
|
Loading…
Reference in New Issue
Block a user