generated from coulomb/repo-seed
Implement infospace scaffold and service baseline
This commit is contained in:
21
tests/test_cli.py
Normal file
21
tests/test_cli.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import json
|
||||
|
||||
from info_tech_canon.cli import main
|
||||
|
||||
|
||||
def test_cli_inspect_emits_json(capsys) -> None:
|
||||
exit_code = main(["inspect"])
|
||||
|
||||
assert exit_code == 0
|
||||
payload = json.loads(capsys.readouterr().out)
|
||||
assert payload["ok"] is True
|
||||
assert payload["infospace"]["artifact_count"] == 15
|
||||
|
||||
|
||||
def test_cli_missing_profile_uses_structured_error(capsys) -> None:
|
||||
exit_code = main(["profile", "inspect", "small-saas"])
|
||||
|
||||
assert exit_code == 2
|
||||
payload = json.loads(capsys.readouterr().out)
|
||||
assert payload["ok"] is False
|
||||
assert payload["error"]["code"] == "missing_profile"
|
||||
Reference in New Issue
Block a user