backend / tests /test_postgresdb_connection.py
praneethys's picture
postgres database integration (#3)
d5684b3 verified
raw
history blame
No virus
371 Bytes
import pytest
from app.engine.postgresdb import get_db
@pytest.mark.skip
def test_postgres_db_connection():
"""
Tests the connection to the postgres db
"""
with get_db() as session:
# Execute a query to test the connection
result = session.execute(f"SELECT 1").scalar()
# Assert that the result is equal to 1
assert result == 1