mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-23 13:15:29 -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,22 @@
|
||||
import sys
|
||||
import types
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from tests.helpers.cli_loader import load_script
|
||||
|
||||
|
||||
def _load_cli(monkeypatch):
|
||||
personal_docs = types.ModuleType("src.personal_docs")
|
||||
personal_docs.PersonalDocsManager = MagicMock()
|
||||
monkeypatch.setitem(sys.modules, "src.personal_docs", personal_docs)
|
||||
return load_script("odysseus-personal")
|
||||
|
||||
|
||||
def test_file_rows_skips_invalid_rows(monkeypatch):
|
||||
cli = _load_cli(monkeypatch)
|
||||
|
||||
assert cli._file_rows([
|
||||
{"name": "notes.txt", "path": "/tmp/notes.txt"},
|
||||
"bad-row",
|
||||
None,
|
||||
]) == [{"name": "notes.txt", "path": "/tmp/notes.txt"}]
|
||||
Reference in New Issue
Block a user