provide DummyMailDelivery for testing; fix auth

This commit is contained in:
Helmut Merz 2025-03-09 09:31:59 +01:00
parent efd47419a0
commit f04297d570
2 changed files with 19 additions and 0 deletions

16
scopes/organize/mail.py Normal file
View file

@ -0,0 +1,16 @@
# scopes.organize.mail
from zope.interface import implementer
from zope.sendmail.interfaces import IMailDelivery
"""Utilities for creating and sending emails."""
@implementer(IMailDelivery)
class DummyMailDelivery:
"""For testing purposes: just store mails in maildata.log"""
def send(self, fromaddr, toaddrs, message):
print("DummyMailDelivery")
print(f"fromaddr: {fromaddr}, toaddrs: {toaddrs}")
print(message)

View file

@ -34,3 +34,6 @@ class JwtAuthentication:
if self.baseAuth is not None:
return self.baseAuth.unauthorized(id, request)
def logout(self, request):
print('*** JwtAuthentication: logout')