From 6de7bd3377d060d108df07fcabe1506d66666232 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 10 Oct 2011 10:06:41 +0200 Subject: [PATCH] test for Object ran Signed-off-by: Steven Armstrong --- lib/cdist/test/object/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/cdist/test/object/__init__.py b/lib/cdist/test/object/__init__.py index c490bdc3..75322654 100644 --- a/lib/cdist/test/object/__init__.py +++ b/lib/cdist/test/object/__init__.py @@ -61,6 +61,7 @@ class ObjectTestCase(unittest.TestCase): def tearDown(self): self.cdist_object.changed = False self.cdist_object.prepared = False + self.cdist_object.ran = False def test_name(self): self.assertEqual(self.cdist_object.name, '__third/moon') @@ -107,4 +108,10 @@ class ObjectTestCase(unittest.TestCase): def test_prepared_after_changing(self): self.cdist_object.prepared = True self.assertTrue(self.cdist_object.prepared) -#suite = unittest.TestLoader().loadTestsFromTestCase(ObjectTestCase) + + def test_ran(self): + self.assertFalse(self.cdist_object.ran) + + def test_ran_after_changing(self): + self.cdist_object.ran = True + self.assertTrue(self.cdist_object.ran)