From af83c7af8e936eb32f934b4f6d40a6d228f876fa Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 11 Oct 2011 09:38:31 +0200 Subject: [PATCH] tests for Object source Signed-off-by: Steven Armstrong --- lib/cdist/test/object/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cdist/test/object/__init__.py b/lib/cdist/test/object/__init__.py index 75322654..eee1563c 100644 --- a/lib/cdist/test/object/__init__.py +++ b/lib/cdist/test/object/__init__.py @@ -62,6 +62,7 @@ class ObjectTestCase(unittest.TestCase): self.cdist_object.changed = False self.cdist_object.prepared = False self.cdist_object.ran = False + self.cdist_object.source = "" def test_name(self): self.assertEqual(self.cdist_object.name, '__third/moon') @@ -115,3 +116,10 @@ class ObjectTestCase(unittest.TestCase): def test_ran_after_changing(self): self.cdist_object.ran = True self.assertTrue(self.cdist_object.ran) + + def test_source(self): + self.assertEqual(self.cdist_object.source, '') + + def test_source_after_changing(self): + self.cdist_object.source = '/path/to/manifest' + self.assertEqual(self.cdist_object.source, '/path/to/manifest')