test machine subcommand
This commit is contained in:
21
pkgs/clan-cli/tests/test_machines_cli.py
Normal file
21
pkgs/clan-cli/tests/test_machines_cli.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from cli import Cli
|
||||
|
||||
|
||||
def test_machine_subcommands(clan_flake: Path, capsys: pytest.CaptureFixture) -> None:
|
||||
cli = Cli()
|
||||
cli.run(["machines", "create", "machine1"])
|
||||
|
||||
capsys.readouterr()
|
||||
cli.run(["machines", "list"])
|
||||
out = capsys.readouterr()
|
||||
assert "machine1\n" == out.out
|
||||
|
||||
cli.run(["machines", "remove", "machine1"])
|
||||
|
||||
capsys.readouterr()
|
||||
cli.run(["machines", "list"])
|
||||
out = capsys.readouterr()
|
||||
assert "" == out.out
|
||||
Reference in New Issue
Block a user