Fix full system test

This commit is contained in:
s3lph 2022-04-18 19:57:36 +02:00
parent 6aaf2f3baa
commit e33692f40a
3 changed files with 9 additions and 10 deletions

View file

@ -79,6 +79,7 @@ class MultiList:
if len(to_add) + len(to_subscribe) + len(to_unsubscribe) + len(to_remove) == 0:
self._logger.info(f'No changes for {self._target}')
else:
for admin in target_admins:
report = AdminReport(self._target, admin.email, self._mail_from,
admin.key.blob if admin.key is not None else None,

View file

@ -38,8 +38,7 @@ class Message(abc.ABC):
return self._mime
def _make_mime(self, content: str) -> email.mime.base.MIMEBase:
# Encrypt to all keys, if possible. Fall back to unencrypted otherwise - PGPy does not
# support every possible key algorithm yet, esp. it can't encrypt to ed25519 keys.
# Encrypt to all keys, if possible. Fall back to unencrypted otherwise
try:
self._mime = self._encrypt_message(content)
except Exception:
@ -134,8 +133,7 @@ class AdminReport(Message):
removed: Set[SchleuderKey]):
if len(subscribed) == 0 and len(unsubscribed) == 0 and \
len(removed) == 0 and len(added) == 0 and len(updated) == 0:
# No changes, not creating admin report
return None
raise ValueError('No changes, not creating admin report')
content = f'''
== Admin Report for MultiSchleuder {schleuder} ==
'''

View file

@ -11,7 +11,7 @@ function gen_key {
Key-Type: EDDSA
Key-Curve: ed25519
Subkey-Type: ECDH
Subkey-Curve: ed25519
Subkey-Curve: cv25519
Expire-Date: 0
Name-Real: Mutlischleuder Test User
Name-Comment: TEST KEY DO NOT USE