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
10 lines
354 B
Python
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
|