From 0851af7d52e98f30ad5454a000c6a7291b62539c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 13 Feb 2012 10:39:04 +0100 Subject: [PATCH] allow object_id to start and end with one /, fail with any // Signed-off-by: Nico Schottelius --- lib/cdist/test/object/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cdist/test/object/__init__.py b/lib/cdist/test/object/__init__.py index 0f8c0189..72530910 100644 --- a/lib/cdist/test/object/__init__.py +++ b/lib/cdist/test/object/__init__.py @@ -54,9 +54,9 @@ class ObjectClassTestCase(test.CdistTestCase): class ObjectIdTestCase(test.CdistTestCase): - def test_object_id_starts_with_slash(self): + def test_object_id_contains_double_slash(self): cdist_type = core.CdistType(type_base_path, '__third') - illegal_object_id = '/object_id/may/not/start/with/slash' + illegal_object_id = '/object_id//may/not/contain/double/slash' with self.assertRaises(core.IllegalObjectIdError): core.CdistObject(cdist_type, object_base_path, illegal_object_id)