From e03f5d08dd616742d558f72545e9d9eedcf7a192 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 19 Dec 2012 21:14:23 +0100 Subject: [PATCH] move / correct tests in object and config_install Signed-off-by: Nico Schottelius --- cdist/test/config_install/__init__.py | 14 -------------- cdist/test/object/__init__.py | 24 ++++++------------------ 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/cdist/test/config_install/__init__.py b/cdist/test/config_install/__init__.py index 2a05d4c5..2abf7614 100644 --- a/cdist/test/config_install/__init__.py +++ b/cdist/test/config_install/__init__.py @@ -101,20 +101,6 @@ class ConfigInstallRunTestCase(test.CdistTestCase): pass self.assertTrue(first.state == first.STATE_DONE) - - def test_non_empty_object_list(self): - """Ensure the object list returned is not empty""" - pass - - def test_requirement_not_found(self): - """Ensure an exception is thrown for missing depedencies""" - cdist_object = self.object_index['__first/man'] - cdist_object.requirements = ['__does/not/exist'] - - with self.assertRaises(core.cdist_object.RequirementNotFoundError): - # Use list, as generator does not (yet) raise the error - list(cdist_object.find_requirements_by_name(cdist_object.requirements)) - def test_unresolvable_requirements(self): """Ensure an exception is thrown for unresolvable depedencies""" diff --git a/cdist/test/object/__init__.py b/cdist/test/object/__init__.py index f3a526aa..c4f46cd1 100644 --- a/cdist/test/object/__init__.py +++ b/cdist/test/object/__init__.py @@ -255,23 +255,11 @@ class ObjectResolveRequirementsTestCase(test.CdistTestCase): self.assertEqual(expected_requirements, found_requirements) - def test_dependency_resolution(self): - first_man = self.object_index['__first/man'] - second_on_the = self.object_index['__second/on-the'] - third_moon = self.object_index['__third/moon'] - first_man.requirements = [second_on_the.name] - second_on_the.requirements = [third_moon.name] - - # FIXME :-) - self.assertTrue(False) -# self.assertEqual( -# self.dependency_resolver.dependencies['__first/man'], -# [third_moon, second_on_the, first_man] -# ) - def test_requirement_not_found(self): - first_man = self.object_index['__first/man'] - first_man.requirements = ['__does/not/exist'] - with self.assertRaises(core.cdist_object.RequirementNotFoundError): - first_man.find_requirements_by_name(first_man.requirements) + """Ensure an exception is thrown for missing depedencies""" + cdist_object = self.object_index['__first/man'] + cdist_object.requirements = ['__does/not/exist'] + with self.assertRaises(core.cdist_object.RequirementNotFoundError): + # Use list, as generator does not (yet) raise the error + list(cdist_object.find_requirements_by_name(cdist_object.requirements))