bugfixes for issue 161 and FIXME: also check that there is no object ID
when type is singleton?
This commit is contained in:
parent
4cca593071
commit
2dd2f5593f
2 changed files with 15 additions and 1 deletions
|
|
@ -94,6 +94,17 @@ class ObjectIdTestCase(test.CdistTestCase):
|
|||
core.CdistObject(cdist_type, object_base_path, illegal_object_id)
|
||||
# if we get here, the test passed
|
||||
|
||||
def test_object_id_contains_only_dot(self):
|
||||
cdist_type = core.CdistType(type_base_path, '__third')
|
||||
illegal_object_id = '.'
|
||||
with self.assertRaises(core.IllegalObjectIdError):
|
||||
core.CdistObject(cdist_type, object_base_path, illegal_object_id)
|
||||
|
||||
def test_object_id_on_singleton_type(self):
|
||||
cdist_type = core.CdistType(type_base_path, '__test_singleton')
|
||||
illegal_object_id = 'object_id'
|
||||
with self.assertRaises(core.IllegalObjectIdError):
|
||||
core.CdistObject(cdist_type, object_base_path, illegal_object_id)
|
||||
|
||||
class ObjectTestCase(test.CdistTestCase):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue