FU-3: re-index on content change (GAP-09) #14
@@ -80,3 +80,10 @@ def test_reindex_case_law_missing_row_raises(monkeypatch):
|
|||||||
monkeypatch.setattr(ingest.db, "get_case_law", _none)
|
monkeypatch.setattr(ingest.db, "get_case_law", _none)
|
||||||
with pytest.raises(ValueError, match="not found"):
|
with pytest.raises(ValueError, match="not found"):
|
||||||
_run(ingest.reindex_case_law(uuid4()))
|
_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()))
|
||||||
|
|||||||
Reference in New Issue
Block a user