markers for notification tests

This commit is contained in:
Matthias 2021-12-03 07:51:21 +01:00
parent 2917af9715
commit 6e464447f5
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -1,5 +1,6 @@
import logging import logging
from datetime import timedelta from datetime import timedelta
from django.conf import settings
from django.template.loader import render_to_string 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 # Collect possible methods
delivery_methods = inheritors(NotificationMethod) 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]]: for method in [a for a in delivery_methods if a not in [SingleNotificationMethod, BulkNotificationMethod]]:
logger.info(f"Triggering method '{method.method_name}'") logger.info(f"Triggering method '{method.method_name}'")