Пример #1
0
 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.")
Пример #2
0
 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.")
Пример #3
0
 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)
Пример #4
0
 def test_handle_exception_debug(self, post_mortem):
     cci.handle_exception_debug(config=None, debug=True)
     post_mortem.assert_called()
Пример #5
0
 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)
Пример #6
0
 def test_handle_exception_debug(self, post_mortem):
     cci.handle_exception_debug(config=None, debug=True)
     post_mortem.assert_called()