File size: 299 Bytes
6d01d5b
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# test_db.py
from app.database import engine
from sqlalchemy import text
import asyncio


async def test_connection():
    async with engine.connect() as conn:
        result = await conn.execute(text("SELECT 1"))
        print("DB Connection OK:", result.scalar())


asyncio.run(test_connection())