test for: .cdist may not be used in object_id
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
e58b52592b
commit
af367a76f8
1 changed files with 7 additions and 1 deletions
|
@ -53,12 +53,18 @@ class ObjectClassTestCase(unittest.TestCase):
|
|||
|
||||
|
||||
class ObjectIdTestCase(unittest.TestCase):
|
||||
def test_illegal_object_id(self):
|
||||
def test_object_id_starts_with_slash(self):
|
||||
cdist_type = core.Type(type_base_path, '__third')
|
||||
illegal_object_id = '/object_id/may/not/start/with/slash'
|
||||
with self.assertRaises(core.IllegalObjectIdError):
|
||||
core.Object(cdist_type, object_base_path, illegal_object_id)
|
||||
|
||||
def test_object_id_contains_dotcdist(self):
|
||||
cdist_type = core.Type(type_base_path, '__third')
|
||||
illegal_object_id = 'object_id/may/not/contain/.cdist/anywhere'
|
||||
with self.assertRaises(core.IllegalObjectIdError):
|
||||
core.Object(cdist_type, object_base_path, illegal_object_id)
|
||||
|
||||
|
||||
class ObjectTestCase(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Reference in a new issue