Ejemplo n.º 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.")
Ejemplo n.º 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.")
Ejemplo n.º 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)
Ejemplo n.º 4
0
 def test_handle_exception_debug(self, post_mortem):
     cci.handle_exception_debug(config=None, debug=True)
     post_mortem.assert_called()
Ejemplo n.º 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)
Ejemplo n.º 6
0
 def test_handle_exception_debug(self, post_mortem):
     cci.handle_exception_debug(config=None, debug=True)
     post_mortem.assert_called()