test(reindex): cover empty-text raise path (FU-3 review)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-30 22:13:18 +00:00
parent 7341ee8275
commit 7e35a24d80

View File

@@ -80,3 +80,10 @@ def test_reindex_case_law_missing_row_raises(monkeypatch):
monkeypatch.setattr(ingest.db, "get_case_law", _none)
with pytest.raises(ValueError, match="not found"):
_run(ingest.reindex_case_law(uuid4()))
def test_reindex_case_law_empty_text_raises(monkeypatch):
async def _empty(x): return {"id": uuid4(), "full_text": " "}
monkeypatch.setattr(ingest.db, "get_case_law", _empty)
with pytest.raises(ValueError, match="no stored full_text"):
_run(ingest.reindex_case_law(uuid4()))