Implement infospace scaffold and service baseline
This commit is contained in:
parent
df6238c7e0
commit
9883a99f78
43 changed files with 35986 additions and 28 deletions
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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue