cubicweb/hooks/notification.py
changeset 12583 4f59a56e6d89
parent 12507 211472ab15c8
--- a/cubicweb/hooks/notification.py	Thu Apr 18 15:09:36 2019 +0200
+++ b/cubicweb/hooks/notification.py	Tue Apr 23 09:33:52 2019 +0200
@@ -70,6 +70,12 @@
                 # to prevent them all.
                 self.exception('Notification failed')
 
+                if self.cnx.vreg.config.mode == "test":
+                    # reraise in testing context because we actually want to
+                    # have those exceptions here and that self.exception is
+                    # filtered in test context
+                    raise
+
 
 class NotificationHook(hook.Hook):
     __abstract__ = True