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)
Esempio n. 2
0
    def test_hook_fail_should_raise_fatal(self):
        self.stubs.Set(SampleHookExceptionPost, 'exception',
                       hooks.FatalHookException())

        self.assertRaises(hooks.FatalHookException, self._hooked, 1)