From c372c55c8876d91e0f40cf5d6ca907019e795f87 Mon Sep 17 00:00:00 2001 From: Keonik1 Date: Mon, 25 Aug 2025 22:09:12 +0300 Subject: [PATCH] try to fix tests - https://github.com/chatmail/relay/pull/614#discussion_r2279758306 --- cmdeploy/src/cmdeploy/tests/test_cmdeploy.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmdeploy/src/cmdeploy/tests/test_cmdeploy.py b/cmdeploy/src/cmdeploy/tests/test_cmdeploy.py index 3084c8ec..e291c971 100644 --- a/cmdeploy/src/cmdeploy/tests/test_cmdeploy.py +++ b/cmdeploy/src/cmdeploy/tests/test_cmdeploy.py @@ -23,7 +23,13 @@ class TestCmdline: def test_init_not_overwrite(self, capsys): assert main(["init", "chat.example.org"]) == 0 - capsys.readouterr() - assert main(["init", "chat.example.org"]) == 1 + out, err = capsys.readouterr() + assert "created config file" in out.lower() + + assert main(["init", "chat.example.org"]) == 0 out, err = capsys.readouterr() assert "path exists" in out.lower() + + assert main(["init", "chat.example.org", "--force"]) == 0 + out, err = capsys.readouterr() + assert "deleting config file" in out.lower()