mirror of
https://github.com/chatmail/relay.git
synced 2026-05-20 12:58:04 +00:00
get rid of xfailing test
This commit is contained in:
@@ -37,6 +37,7 @@ def init_cmd(args, out):
|
|||||||
mail_domain = args.chatmail_domain
|
mail_domain = args.chatmail_domain
|
||||||
if args.inipath.exists():
|
if args.inipath.exists():
|
||||||
print(f"Path exists, not modifying: {args.inipath}")
|
print(f"Path exists, not modifying: {args.inipath}")
|
||||||
|
return 1
|
||||||
else:
|
else:
|
||||||
write_initial_config(args.inipath, mail_domain, overrides={})
|
write_initial_config(args.inipath, mail_domain, overrides={})
|
||||||
out.green(f"created config file for {mail_domain} in {args.inipath}")
|
out.green(f"created config file for {mail_domain} in {args.inipath}")
|
||||||
|
|||||||
@@ -21,8 +21,9 @@ class TestCmdline:
|
|||||||
run = parser.parse_args(["run"])
|
run = parser.parse_args(["run"])
|
||||||
assert init and run
|
assert init and run
|
||||||
|
|
||||||
@pytest.mark.xfail(reason="init doesn't exit anymore, check for CLI output instead")
|
def test_init_not_overwrite(self, capsys):
|
||||||
def test_init_not_overwrite(self):
|
assert main(["init", "chat.example.org"]) == 0
|
||||||
main(["init", "chat.example.org"])
|
capsys.readouterr()
|
||||||
with pytest.raises(SystemExit):
|
assert main(["init", "chat.example.org"]) == 1
|
||||||
main(["init", "chat.example.org"])
|
out, err = capsys.readouterr()
|
||||||
|
assert "path exists" in out.lower()
|
||||||
|
|||||||
Reference in New Issue
Block a user