docling-studio/document-parser/tests/neo4j/test_driver.py
Pier-Jean Malandrino 712fc3f1cd feat(neo4j): Day 1 — compose service, driver, schema bootstrap
Add Neo4j as an optional graph-native storage layer (ingestion profile).
Introduces infra/neo4j with a singleton async driver wrapper and an
idempotent bootstrap of constraints + indexes, wired into the FastAPI
lifespan. Integration tests skip when no live Neo4j is reachable.

Refs #186
2026-04-29 14:00:00 +02:00

10 lines
354 B
Python

"""Neo4j driver connectivity smoke test."""
from __future__ import annotations
async def test_driver_connects_and_runs_cypher(neo4j_driver):
async with neo4j_driver.driver.session(database=neo4j_driver.database) as session:
result = await session.run("RETURN 1 AS x")
record = await result.single()
assert record["x"] == 1