From 6e464447f5032292be2dd0bbbb114157e7fbc861 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 3 Dec 2021 07:51:21 +0100 Subject: [PATCH] markers for notification tests --- InvenTree/common/notifications.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InvenTree/common/notifications.py b/InvenTree/common/notifications.py index 49071ab0c3..ec24df0bf2 100644 --- a/InvenTree/common/notifications.py +++ b/InvenTree/common/notifications.py @@ -1,5 +1,6 @@ import logging from datetime import timedelta +from django.conf import settings from django.template.loader import render_to_string @@ -117,6 +118,9 @@ def trigger_notifaction(obj, entry_name=None, obj_ref='pk', receivers=None, rece # Collect possible methods delivery_methods = inheritors(NotificationMethod) + if settings.TESTING: + print('TESTING') + print(delivery_methods) for method in [a for a in delivery_methods if a not in [SingleNotificationMethod, BulkNotificationMethod]]: logger.info(f"Triggering method '{method.method_name}'")