diff --git a/InvenTree/common/notifications.py b/InvenTree/common/notifications.py index ec24df0bf2..0d61e3d0c7 100644 --- a/InvenTree/common/notifications.py +++ b/InvenTree/common/notifications.py @@ -118,8 +118,9 @@ def trigger_notifaction(obj, entry_name=None, obj_ref='pk', receivers=None, rece # Collect possible methods delivery_methods = inheritors(NotificationMethod) + + # TODO remove -> this is for debugging the delivery method runfs if settings.TESTING: - print('TESTING') print(delivery_methods) for method in [a for a in delivery_methods if a not in [SingleNotificationMethod, BulkNotificationMethod]]: @@ -127,8 +128,10 @@ def trigger_notifaction(obj, entry_name=None, obj_ref='pk', receivers=None, rece try: deliver_notification(method, obj, entry_name, receivers, notification_context) except NotImplementedError as error: + print('NotImplementedError') raise error except Exception as error: + print(error) logger.error(error) # Set delivery flag diff --git a/InvenTree/common/test_notifications.py b/InvenTree/common/test_notifications.py index 4785de8908..8eff1ef7fc 100644 --- a/InvenTree/common/test_notifications.py +++ b/InvenTree/common/test_notifications.py @@ -25,6 +25,7 @@ class NotificationTests(BaseNotificationIntegrationTest): def test_SingleNotificationMethod(self): """ensure the implementation requirements are tested""" + print('TESTING SingleNotificationMethod') class WrongImplementation(SingleNotificationMethod): def setup(self): @@ -36,6 +37,7 @@ class NotificationTests(BaseNotificationIntegrationTest): def test_BulkNotificationMethod(self): """ensure the implementation requirements are tested""" + print('TESTING BulkNotificationMethod') class WrongImplementation(BulkNotificationMethod): def setup(self):