Merge branch 'master' into 4.0-pre-not-stable

This commit is contained in:
Nico Schottelius 2014-02-10 14:56:19 +01:00
commit 42b240f496
5 changed files with 25 additions and 1 deletions

View file

@ -2,6 +2,7 @@
#
# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc)
# 2012 Nico Schottelius (nico-cdist at schottelius.org)
# 2014 Daniel Heule (hda at sfs.biz)
#
# This file is part of cdist.
#
@ -94,6 +95,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):