PEP fixes

This commit is contained in:
Matthias 2021-12-04 03:57:45 +01:00
parent f88882da8e
commit 75c7722612
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 7 additions and 15 deletions

View File

@ -1,7 +1,6 @@
import logging
from datetime import timedelta
from django.conf import settings
from django.template.loader import render_to_string
from allauth.account.models import EmailAddress
@ -120,6 +119,7 @@ class EmailNotification(BulkNotificationMethod):
return True
class UIMessageNotification(SingleNotificationMethod):
METHOD_NAME = 'ui_message'
@ -128,12 +128,12 @@ class UIMessageNotification(SingleNotificationMethod):
def send(self, target):
NotificationMessage.objects.create(
target_object = self.obj,
source_object = target,
user = target,
category = self.category,
name = self.context['name'],
message = self.context['message'],
target_object=self.obj,
source_object=target,
user=target,
category=self.category,
name=self.context['name'],
message=self.context['message'],
)
# endregion
# endregion

View File

@ -43,10 +43,6 @@ class NotificationTests(BaseNotificationIntegrationTest):
def get_targets(self):
return []
def setup(self):
print('running setup on WrongImplementation')
return super().setup()
with self.assertRaises(NotImplementedError):
self._notification_run()
@ -59,10 +55,6 @@ class NotificationTests(BaseNotificationIntegrationTest):
def get_targets(self):
return []
def setup(self):
print('running setup on WrongImplementation')
return super().setup()
with self.assertRaises(NotImplementedError):
self._notification_run()