Fix full system test
This commit is contained in:
parent
6aaf2f3baa
commit
e33692f40a
3 changed files with 9 additions and 10 deletions
|
@ -79,6 +79,7 @@ class MultiList:
|
||||||
|
|
||||||
if len(to_add) + len(to_subscribe) + len(to_unsubscribe) + len(to_remove) == 0:
|
if len(to_add) + len(to_subscribe) + len(to_unsubscribe) + len(to_remove) == 0:
|
||||||
self._logger.info(f'No changes for {self._target}')
|
self._logger.info(f'No changes for {self._target}')
|
||||||
|
else:
|
||||||
for admin in target_admins:
|
for admin in target_admins:
|
||||||
report = AdminReport(self._target, admin.email, self._mail_from,
|
report = AdminReport(self._target, admin.email, self._mail_from,
|
||||||
admin.key.blob if admin.key is not None else None,
|
admin.key.blob if admin.key is not None else None,
|
||||||
|
|
|
@ -38,8 +38,7 @@ class Message(abc.ABC):
|
||||||
return self._mime
|
return self._mime
|
||||||
|
|
||||||
def _make_mime(self, content: str) -> email.mime.base.MIMEBase:
|
def _make_mime(self, content: str) -> email.mime.base.MIMEBase:
|
||||||
# Encrypt to all keys, if possible. Fall back to unencrypted otherwise - PGPy does not
|
# Encrypt to all keys, if possible. Fall back to unencrypted otherwise
|
||||||
# support every possible key algorithm yet, esp. it can't encrypt to ed25519 keys.
|
|
||||||
try:
|
try:
|
||||||
self._mime = self._encrypt_message(content)
|
self._mime = self._encrypt_message(content)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
@ -134,8 +133,7 @@ class AdminReport(Message):
|
||||||
removed: Set[SchleuderKey]):
|
removed: Set[SchleuderKey]):
|
||||||
if len(subscribed) == 0 and len(unsubscribed) == 0 and \
|
if len(subscribed) == 0 and len(unsubscribed) == 0 and \
|
||||||
len(removed) == 0 and len(added) == 0 and len(updated) == 0:
|
len(removed) == 0 and len(added) == 0 and len(updated) == 0:
|
||||||
# No changes, not creating admin report
|
raise ValueError('No changes, not creating admin report')
|
||||||
return None
|
|
||||||
content = f'''
|
content = f'''
|
||||||
== Admin Report for MultiSchleuder {schleuder} ==
|
== Admin Report for MultiSchleuder {schleuder} ==
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -11,7 +11,7 @@ function gen_key {
|
||||||
Key-Type: EDDSA
|
Key-Type: EDDSA
|
||||||
Key-Curve: ed25519
|
Key-Curve: ed25519
|
||||||
Subkey-Type: ECDH
|
Subkey-Type: ECDH
|
||||||
Subkey-Curve: ed25519
|
Subkey-Curve: cv25519
|
||||||
Expire-Date: 0
|
Expire-Date: 0
|
||||||
Name-Real: Mutlischleuder Test User
|
Name-Real: Mutlischleuder Test User
|
||||||
Name-Comment: TEST KEY DO NOT USE
|
Name-Comment: TEST KEY DO NOT USE
|
||||||
|
|
Loading…
Reference in a new issue