Fix full system test
This commit is contained in:
parent
6aaf2f3baa
commit
e33692f40a
3 changed files with 9 additions and 10 deletions
|
@ -79,11 +79,12 @@ 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}')
|
||||
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,
|
||||
to_subscribe, to_unsubscribe, to_update, to_add, to_remove)
|
||||
self._reporter.add_message(report)
|
||||
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,
|
||||
to_subscribe, to_unsubscribe, to_update, to_add, to_remove)
|
||||
self._reporter.add_message(report)
|
||||
self._logger.info(f'Finished processing: {self._target}')
|
||||
|
||||
def _lists_by_name(self) -> Tuple[SchleuderList, List[SchleuderList]]:
|
||||
|
|
|
@ -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} ==
|
||||
'''
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue