move / correct tests in object and config_install

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
Nico Schottelius 2012-12-19 21:14:23 +01:00
parent ef45cd5ce0
commit e03f5d08dd
2 changed files with 6 additions and 32 deletions

View File

@ -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"""

View File

@ -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))