diff --git a/cmdeploy/src/cmdeploy/__init__.py b/cmdeploy/src/cmdeploy/__init__.py index 37877583a..eb3ae9461 100644 --- a/cmdeploy/src/cmdeploy/__init__.py +++ b/cmdeploy/src/cmdeploy/__init__.py @@ -350,9 +350,7 @@ def _configure_dovecot(config: Config, debug: bool = False) -> bool: need_restart |= lua_push_notification_script.changed sieve_script = files.put( - src=importlib.resources.files(__package__).joinpath( - "dovecot/default.sieve" - ), + src=importlib.resources.files(__package__).joinpath("dovecot/default.sieve"), dest="/etc/dovecot/default.sieve", user="root", group="root", @@ -361,10 +359,8 @@ def _configure_dovecot(config: Config, debug: bool = False) -> bool: need_restart |= sieve_script.changed if sieve_script.changed: server.shell( - name=f"compile sieve script", - commands=[ - f"/usr/bin/sievec /etc/dovecot/default.sieve" - ], + name="compile sieve script", + commands=["/usr/bin/sievec /etc/dovecot/default.sieve"], ) files.template( @@ -457,7 +453,9 @@ def check_config(config): blocked_words = "merlinux schmieder testrun.org".split() for key in config.__dict__: value = config.__dict__[key] - if key.startswith("privacy") and any(x in str(value) for x in blocked_words): + if key.startswith("privacy") and any( + x in str(value) for x in blocked_words + ): raise ValueError( f"please set your own privacy contacts/addresses in {config._inipath}" ) diff --git a/cmdeploy/src/cmdeploy/dns.py b/cmdeploy/src/cmdeploy/dns.py index 465ba52ed..f9c4f884c 100644 --- a/cmdeploy/src/cmdeploy/dns.py +++ b/cmdeploy/src/cmdeploy/dns.py @@ -5,8 +5,6 @@ import subprocess import datetime -from typing import Optional - class DNS: def __init__(self, out, mail_domain): diff --git a/cmdeploy/src/cmdeploy/tests/online/test_2_deltachat.py b/cmdeploy/src/cmdeploy/tests/online/test_2_deltachat.py index e8a724435..d765d0dfe 100644 --- a/cmdeploy/src/cmdeploy/tests/online/test_2_deltachat.py +++ b/cmdeploy/src/cmdeploy/tests/online/test_2_deltachat.py @@ -63,7 +63,7 @@ def parse_size_limit(limit: str) -> int: addr = ac2.get_config("addr").lower() saved_ok = 0 - for line in remote.iter_output("journalctl -f -u dovecot"): + for line in remote.iter_output("journalctl -n0 -f -u dovecot"): if addr not in line: # print(line) continue @@ -112,7 +112,7 @@ def test_read_receipts_between_instances(self, cmfactory, lp, maildomain2): lp.sec("ac1 sends a message and ac2 marks it as seen") chat = ac1.create_chat(ac2) msg = chat.send_text("hi") - m = ac2.wait_next_incoming_message() + m = ac2._evtracker.wait_next_incoming_message() m.mark_seen() # we can only indirectly wait for mark-seen to cause an smtp-error lp.sec("try to wait for markseen to complete and check error states") @@ -132,7 +132,7 @@ def test_hide_senders_ip_address(cmfactory): chat = cmfactory.get_accepted_chat(user1, user2) chat.send_text("testing submission header cleanup") - user2.wait_next_incoming_message() + user2._evtracker.wait_next_incoming_message() user2.direct_imap.select_folder("Inbox") msg = user2.direct_imap.get_all_messages()[0] assert public_ip not in msg.obj.as_string() @@ -146,5 +146,5 @@ def test_echobot(cmfactory, chatmail_config, lp): text = "hi, I hope you text me back" chat.send_text(text) lp.sec("Wait for reply from echobot") - reply = ac.wait_next_incoming_message() + reply = ac._evtracker.wait_next_incoming_message() assert reply.text == text