Files
odysseus/tests/cli/test_tasks_cli_preview.py
Alexandre Teixeira a79c0bd369 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
2026-06-11 17:01:14 +00:00

12 lines
434 B
Python

from tests.helpers.cli_loader import load_script
from tests.helpers.db_stubs import make_core_db_stub
def test_preview_text_ignores_non_string_values(monkeypatch):
make_core_db_stub(monkeypatch, models=["ScheduledTask", "TaskRun"])
cli = load_script("odysseus-tasks")
assert cli._preview_text(None) == ""
assert cli._preview_text({"bad": "row"}) == ""
assert cli._preview_text("x" * 201) == ("x" * 200) + ""