diff --git a/cmdeploy/src/cmdeploy/tests/online/test_0_login.py b/cmdeploy/src/cmdeploy/tests/online/test_0_login.py index 86319e54..248880c0 100644 --- a/cmdeploy/src/cmdeploy/tests/online/test_0_login.py +++ b/cmdeploy/src/cmdeploy/tests/online/test_0_login.py @@ -2,6 +2,16 @@ import pytest import threading import queue +from chatmaild.config import read_config +from cmdeploy.cmdeploy import main + + +def test_init(tmp_path, maildomain): + inipath = tmp_path.joinpath("chatmail.ini") + main(["init", "--config", str(inipath), maildomain]) + config = read_config(inipath) + assert config.mail_domain == maildomain + def test_login_basic_functioning(imap_or_smtp, gencreds, lp): """Test a) that an initial login creates a user automatically diff --git a/cmdeploy/src/cmdeploy/tests/test_cmdeploy.py b/cmdeploy/src/cmdeploy/tests/test_cmdeploy.py index bc4f9f8f..215a1d13 100644 --- a/cmdeploy/src/cmdeploy/tests/test_cmdeploy.py +++ b/cmdeploy/src/cmdeploy/tests/test_cmdeploy.py @@ -2,7 +2,6 @@ import os import pytest from cmdeploy.cmdeploy import get_parser, main -from chatmaild.config import read_config @pytest.fixture(autouse=True) @@ -21,12 +20,6 @@ class TestCmdline: run = parser.parse_args(["run"]) assert init and run - def test_init(self, tmp_path): - main(["init", "chat.example.org"]) - inipath = tmp_path.joinpath("chatmail.ini") - config = read_config(inipath) - assert config.mail_domain == "chat.example.org" - @pytest.mark.xfail(reason="init doesn't exit anymore, check for CLI output instead") def test_init_not_overwrite(self): main(["init", "chat.example.org"])