def test_handle_exception_debug_throw(self): throw = Exception() try: cci.handle_exception_debug(config=None, debug=False, throw_exception=throw) except Exception as err: self.assertIs(throw, err) else: self.fail("Expected exception to be thrown.")
def test_handle_exception_debug_sentry(self, handle_sentry_event): _marker = object() with self.assertRaises(Exception): cci.handle_exception_debug(config=_marker, debug=False) handle_sentry_event.assert_called_once_with(_marker, None)
def test_handle_exception_debug(self, post_mortem): cci.handle_exception_debug(config=None, debug=True) post_mortem.assert_called()