mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-28 07:35:27 -04:00
test: move area_cli tests into cli directory (#3842)
* test: move area_cli tests into cli directory * test: include research CLI status in cli test move
This commit is contained in:
committed by
GitHub
parent
3e65326c3f
commit
a79c0bd369
@@ -0,0 +1,17 @@
|
||||
import io
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.helpers.cli_loader import load_script
|
||||
|
||||
|
||||
def test_state_set_rejects_non_object_json(tmp_path, monkeypatch, capsys):
|
||||
cli = load_script("odysseus-cookbook")
|
||||
cli._STATE_PATH = tmp_path / "cookbook_state.json"
|
||||
monkeypatch.setattr(cli.sys, "stdin", io.StringIO("[]"))
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
cli.cmd_state_set(type("Args", (), {})())
|
||||
|
||||
assert "expected a JSON object" in capsys.readouterr().err
|
||||
assert not cli._STATE_PATH.exists()
|
||||
Reference in New Issue
Block a user