From 6c27eaa506cda1d4a8ff9b725a71660cebafb185 Mon Sep 17 00:00:00 2001 From: missytake Date: Thu, 15 May 2025 14:36:40 +0200 Subject: [PATCH] cmdeploy fmt --- cmdeploy/src/cmdeploy/__init__.py | 2 +- cmdeploy/src/cmdeploy/tests/online/test_1_basic.py | 8 ++++++-- cmdeploy/src/cmdeploy/tests/plugin.py | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmdeploy/src/cmdeploy/__init__.py b/cmdeploy/src/cmdeploy/__init__.py index 11da2e17..1755be04 100644 --- a/cmdeploy/src/cmdeploy/__init__.py +++ b/cmdeploy/src/cmdeploy/__init__.py @@ -367,7 +367,7 @@ def _configure_dovecot(config: Config, debug: bool = False) -> bool: if host.get_fact(Sysctl)[key] > 65535: # Skip updating limits if already sufficient # (enables running in incus containers where sysctl readonly) - continue + continue server.sysctl( name=f"Change {key}", key=key, diff --git a/cmdeploy/src/cmdeploy/tests/online/test_1_basic.py b/cmdeploy/src/cmdeploy/tests/online/test_1_basic.py index 6ab96904..6c096677 100644 --- a/cmdeploy/src/cmdeploy/tests/online/test_1_basic.py +++ b/cmdeploy/src/cmdeploy/tests/online/test_1_basic.py @@ -118,7 +118,9 @@ def test_authenticated_from(cmsetup, maildata): @pytest.mark.parametrize("from_addr", ["fake@example.org", "fake@testrun.org"]) def test_reject_missing_dkim(cmsetup, maildata, from_addr): recipient = cmsetup.gen_users(1)[0] - msg = maildata("encrypted.eml", from_addr=from_addr, to_addr=recipient.addr).as_string() + msg = maildata( + "encrypted.eml", from_addr=from_addr, to_addr=recipient.addr + ).as_string() try: conn = smtplib.SMTP(cmsetup.maildomain, 25, timeout=10) except TimeoutError: @@ -183,7 +185,9 @@ def test_expunged(remote, chatmail_config): f"find {chatmail_config.mailboxes_dir} -path '*/.*/tmp/*' -mtime +{outdated_days} -type f", ] outdated_days = int(chatmail_config.delete_large_after) + 1 - find_cmds.append("find {chatmail_config.mailboxes_dir} -path '*/cur/*' -mtime +{outdated_days} -size +200k -type f") + find_cmds.append( + "find {chatmail_config.mailboxes_dir} -path '*/cur/*' -mtime +{outdated_days} -size +200k -type f" + ) for cmd in find_cmds: for line in remote.iter_output(cmd): assert not line diff --git a/cmdeploy/src/cmdeploy/tests/plugin.py b/cmdeploy/src/cmdeploy/tests/plugin.py index 4ffd7a1e..6037518b 100644 --- a/cmdeploy/src/cmdeploy/tests/plugin.py +++ b/cmdeploy/src/cmdeploy/tests/plugin.py @@ -307,6 +307,7 @@ def cmfactory(request, gencreds, tmpdir, maildomain): class Data: def read_path(self, path): return + am = ACFactory(request=request, tmpdir=tmpdir, testprocess=testproc, data=Data()) # nb. a bit hacky