Files
Lyra/worker/tests/test_db.py
T
2026-07-10 17:32:20 +02:00

12 lines
359 B
Python

from lyra_worker.db import wait_for_db
def test_wait_for_db_returns_usable_connection_when_schema_ready(conn):
# `conn` fixture guarantees the DB is up and the schema is migrated.
result = wait_for_db(timeout=5)
try:
with result.cursor() as cur:
cur.execute('SELECT 1 FROM "Job" LIMIT 0')
finally:
result.close()