tests for mail tasks

This commit is contained in:
jonaswinkler
2020-12-01 14:31:36 +01:00
parent d58706a34b
commit 1ce6466ef8
2 changed files with 45 additions and 3 deletions

View File

@@ -17,8 +17,8 @@ def process_mail_accounts():
def process_mail_account(name):
account = MailAccount.objects.find(name=name)
if account:
try:
account = MailAccount.objects.get(name=name)
MailAccountHandler().handle_mail_account(account)
else:
except MailAccount.DoesNotExist:
logging.error("Unknown mail acccount: {}".format(name))