better debugging for wrong type, fix emulator tests, fixes #176

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2013-05-27 16:36:20 +02:00
commit 3d73cd2fd3
2 changed files with 9 additions and 4 deletions

View file

@ -63,13 +63,13 @@ class EmulatorTestCase(test.CdistTestCase):
def test_nonexistent_type_exec(self):
argv = ['__does-not-exist']
self.assertRaises(core.NoSuchTypeError, emulator.Emulator, argv, env=self.env)
self.assertRaises(core.cdist_type.NoSuchTypeError, 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.NoSuchTypeError, emu.run)
self.assertRaises(core.cdist_type.NoSuchTypeError, emu.run)
def test_illegal_object_id_requirement(self):
argv = ['__file', '/tmp/foobar']
@ -81,7 +81,7 @@ class EmulatorTestCase(test.CdistTestCase):
argv = ['__file', '/tmp/foobar']
self.env['require'] = '__file'
emu = emulator.Emulator(argv, env=self.env)
self.assertRaises(core.IllegalObjectIdError, emu.run)
self.assertRaises(core.cdist_object.MissingObjectIdError, emu.run)
def test_singleton_object_requirement(self):
argv = ['__file', '/tmp/foobar']