This commit is contained in:
@@ -754,4 +754,16 @@ def test_auto_map_ocr_returns_job_id_and_status_completes(monkeypatch):
|
||||
body = status.json()
|
||||
assert body["status"] == "completed"
|
||||
assert body["counts"]["questions"] >= 2
|
||||
|
||||
|
||||
def test_auto_map_ocr_path_projects_to_neo4j(monkeypatch, _stub_projection):
|
||||
# Image-only papers route through the async OCR job; regression: that path must project to Neo4j
|
||||
# like the born-digital fast path, or the graph is never built for the primary target.
|
||||
store = _template_with_source()
|
||||
client, store = make_client(store=store)
|
||||
_patch_auto_map(monkeypatch, store, fast=False)
|
||||
resp = client.post("/api/exam/templates/t1/auto-map")
|
||||
assert resp.status_code == 202
|
||||
# the BackgroundTask runs after the response under TestClient
|
||||
assert "t1" in _stub_projection
|
||||
assert body["template"]["layout"]
|
||||
|
||||
Reference in New Issue
Block a user