canaille-globuzma/tests/app/commands/test_check.py
2023-06-03 23:38:45 +02:00

14 lines
436 B
Python

from canaille.commands import cli
def test_check_command(testclient):
runner = testclient.app.test_cli_runner()
res = runner.invoke(cli, ["check"])
assert res.exit_code == 0, res.stdout
def test_check_command_fail(testclient):
testclient.app.config["SMTP"]["HOST"] = "invalid-domain.com"
runner = testclient.app.test_cli_runner()
res = runner.invoke(cli, ["check"])
assert res.exit_code == 1, res.stdout