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:
Antoine Catton 2014-12-30 22:05:08 -07:00
parent 6610a9c384
commit 9717d5d928
5 changed files with 9 additions and 0 deletions

View File

@ -153,3 +153,10 @@ class TypeTestCase(test.CdistTestCase):
self.assertFalse('optional2' in cdist_type.parameter_defaults)
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']
)

View File

@ -0,0 +1,2 @@
foo
bar