From 7855a485b627100886275e9446e2257b4c12f054 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 10 Oct 2011 10:05:46 +0200 Subject: [PATCH] test for Object prepared Signed-off-by: Steven Armstrong --- lib/cdist/test/object/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cdist/test/object/__init__.py b/lib/cdist/test/object/__init__.py index a85e8df9..c490bdc3 100644 --- a/lib/cdist/test/object/__init__.py +++ b/lib/cdist/test/object/__init__.py @@ -60,6 +60,7 @@ class ObjectTestCase(unittest.TestCase): def tearDown(self): self.cdist_object.changed = False + self.cdist_object.prepared = False def test_name(self): self.assertEqual(self.cdist_object.name, '__third/moon') @@ -100,4 +101,10 @@ class ObjectTestCase(unittest.TestCase): self.cdist_object.changed = True self.assertTrue(self.cdist_object.changed) + def test_prepared(self): + self.assertFalse(self.cdist_object.prepared) + + def test_prepared_after_changing(self): + self.cdist_object.prepared = True + self.assertTrue(self.cdist_object.prepared) #suite = unittest.TestLoader().loadTestsFromTestCase(ObjectTestCase)