forked from ungleich-public/cdist
NoSuchTypeError -> InvalidTypeError
This commit is contained in:
parent
5e087fd280
commit
e6c5563a16
6 changed files with 15 additions and 8 deletions
|
|
@ -55,7 +55,7 @@ class TypeTestCase(test.CdistTestCase):
|
|||
|
||||
def test_nonexistent_type(self):
|
||||
base_path = fixtures
|
||||
self.assertRaises(core.NoSuchTypeError, core.CdistType, base_path,
|
||||
self.assertRaises(core.InvalidTypeError, core.CdistType, base_path,
|
||||
'__i-dont-exist')
|
||||
|
||||
def test_name(self):
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ class ConfigRunTestCase(test.CdistTestCase):
|
|||
"""Unknown type should be detected in the resolving process"""
|
||||
first = self.object_index['__first/man']
|
||||
first.requirements = ['__nosuchtype/not/exist']
|
||||
with self.assertRaises(cdist.core.cdist_type.NoSuchTypeError):
|
||||
with self.assertRaises(cdist.core.cdist_type.InvalidTypeError):
|
||||
self.config.iterate_until_finished()
|
||||
|
||||
def test_requirement_singleton_where_no_singleton(self):
|
||||
|
|
|
|||
|
|
@ -76,14 +76,14 @@ class EmulatorTestCase(test.CdistTestCase):
|
|||
|
||||
def test_nonexistent_type_exec(self):
|
||||
argv = ['__does-not-exist']
|
||||
self.assertRaises(core.cdist_type.NoSuchTypeError, emulator.Emulator,
|
||||
self.assertRaises(core.cdist_type.InvalidTypeError, emulator.Emulator,
|
||||
argv, env=self.env)
|
||||
|
||||
def test_nonexistent_type_requirement(self):
|
||||
argv = ['__file', '/tmp/foobar']
|
||||
self.env['require'] = '__does-not-exist/some-id'
|
||||
emu = emulator.Emulator(argv, env=self.env)
|
||||
self.assertRaises(core.cdist_type.NoSuchTypeError, emu.run)
|
||||
self.assertRaises(core.cdist_type.InvalidTypeError, emu.run)
|
||||
|
||||
def test_illegal_object_id_requirement(self):
|
||||
argv = ['__file', '/tmp/foobar']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue