Add test case: what if there's a directory in defaults
The goal of the directory name is to be before foo and bar
This commit is contained in:
parent
6610a9c384
commit
9717d5d928
5 changed files with 9 additions and 0 deletions
|
@ -153,3 +153,10 @@ class TypeTestCase(test.CdistTestCase):
|
||||||
self.assertFalse('optional2' in cdist_type.parameter_defaults)
|
self.assertFalse('optional2' in cdist_type.parameter_defaults)
|
||||||
self.assertEqual(cdist_type.parameter_defaults['optional1'], 'value1')
|
self.assertEqual(cdist_type.parameter_defaults['optional1'], 'value1')
|
||||||
|
|
||||||
|
def test_directory_in_default(self):
|
||||||
|
base_path = fixtures
|
||||||
|
cdist_type = core.CdistType(base_path, '__directory_in_default')
|
||||||
|
self.assertEqual(
|
||||||
|
list(sorted(cdist_type.parameter_defaults.keys())),
|
||||||
|
['bar', 'foo']
|
||||||
|
)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
foo
|
||||||
|
bar
|
Loading…
Reference in a new issue