Skip to content

Commit c87cea0

Browse files
HumanBean17claude
andcommitted
fix CI: stub _get_sentence_transformer in remaining search tests, use kuzu_graph for meta test
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent bc358b1 commit c87cea0

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_mcp_v2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ def test_search_cross_kind_filter_returns_failure(monkeypatch, kuzu_graph) -> No
594594

595595

596596
def test_search_filter_empty_string_treated_as_none(monkeypatch, kuzu_graph) -> None:
597+
monkeypatch.setattr("mcp_v2._get_sentence_transformer", lambda *a, **kw: None)
597598
monkeypatch.setattr("mcp_v2.run_search", lambda *args, **kwargs: _fake_search_rows())
598599
baseline = search_v2("ChatService", graph=kuzu_graph)
599600
empty = search_v2("ChatService", filter="", graph=kuzu_graph)
@@ -605,6 +606,7 @@ def test_search_filter_empty_string_treated_as_none(monkeypatch, kuzu_graph) ->
605606

606607

607608
def test_search_filter_json_null_treated_as_none(monkeypatch, kuzu_graph) -> None:
609+
monkeypatch.setattr("mcp_v2._get_sentence_transformer", lambda *a, **kw: None)
608610
monkeypatch.setattr("mcp_v2.run_search", lambda *args, **kwargs: _fake_search_rows())
609611
baseline = search_v2("ChatService", graph=kuzu_graph)
610612
out = search_v2("ChatService", filter="null", graph=kuzu_graph)

tests/test_mcp_v2_compose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def test_search_populates_symbol_id_when_chunk_rooted_in_symbol(monkeypatch, kuz
233233
assert all(hit.symbol_id is not None for hit in rooted)
234234

235235

236-
def test_meta_returns_per_edge_type_counts(mcp_env) -> None:
236+
def test_meta_returns_per_edge_type_counts(kuzu_graph) -> None:
237237
out = _graph_meta_output()
238238
assert out.success is True
239239
assert set(out.edge_counts.keys()) == set(_EDGE_TYPES)

0 commit comments

Comments
 (0)