test for Object changed
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
86f976976e
commit
f2701cb512
1 changed files with 10 additions and 0 deletions
|
@ -58,6 +58,9 @@ class ObjectTestCase(unittest.TestCase):
|
|||
self.cdist_type = cdist.core.Type(type_base_path, '__third')
|
||||
self.cdist_object = cdist.core.Object(self.cdist_type, object_base_path, 'moon')
|
||||
|
||||
def tearDown(self):
|
||||
self.cdist_object.changed = False
|
||||
|
||||
def test_name(self):
|
||||
self.assertEqual(self.cdist_object.name, '__third/moon')
|
||||
|
||||
|
@ -90,4 +93,11 @@ class ObjectTestCase(unittest.TestCase):
|
|||
expected = []
|
||||
self.assertEqual(list(self.cdist_object.requirements), expected)
|
||||
|
||||
def test_changed(self):
|
||||
self.assertFalse(self.cdist_object.changed)
|
||||
|
||||
def test_changed_after_changing(self):
|
||||
self.cdist_object.changed = True
|
||||
self.assertTrue(self.cdist_object.changed)
|
||||
|
||||
#suite = unittest.TestLoader().loadTestsFromTestCase(ObjectTestCase)
|
||||
|
|
Loading…
Reference in a new issue