Files
hermes-agent/tests/hermes_cli/test_models.py
0xbyt4 8fc28c34ce test: reorganize test structure and add missing unit tests
Reorganize flat tests/ directory to mirror source code structure
(tools/, gateway/, hermes_cli/, integration/). Add 11 new test files
covering previously untested modules: registry, patch_parser,
fuzzy_match, todo_tool, approval, file_tools, gateway session/config/
delivery, and hermes_cli config/models. Total: 147 unit tests passing,
9 integration tests gated behind pytest marker.
2026-02-26 03:20:08 +03:00

34 lines
948 B
Python

"""Tests for the hermes_cli models module."""
from hermes_cli.models import OPENROUTER_MODELS, menu_labels, model_ids
class TestModelIds:
def test_returns_strings(self):
ids = model_ids()
assert isinstance(ids, list)
assert len(ids) > 0
assert all(isinstance(mid, str) for mid in ids)
def test_ids_match_models_list(self):
ids = model_ids()
expected = [mid for mid, _ in OPENROUTER_MODELS]
assert ids == expected
class TestMenuLabels:
def test_same_length_as_model_ids(self):
labels = menu_labels()
ids = model_ids()
assert len(labels) == len(ids)
def test_recommended_in_first(self):
labels = menu_labels()
assert "recommended" in labels[0].lower()
def test_labels_contain_model_ids(self):
labels = menu_labels()
ids = model_ids()
for label, mid in zip(labels, ids):
assert mid in label