def test_hook_fail_should_raise_fatal(self): self.stub_out('nova.tests.unit.test_hooks.' 'SampleHookExceptionPost.exception', hooks.FatalHookException()) self.assertRaises(hooks.FatalHookException, self._hooked, 1)
def test_hook_fail_should_raise_fatal(self): self.stubs.Set(SampleHookExceptionPost, 'exception', hooks.FatalHookException()) self.assertRaises(hooks.FatalHookException, self._hooked, 1)