Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _create_postgres_engine(
RuntimeError: If engine creation fails or if creating the specified schema fails.
"""
postgres_url = (
f"postgresql://{config.user}:{config.password.get_secret_value()}@"
f"postgresql+psycopg2://{config.user}:{config.password.get_secret_value()}@"
f"{config.host}:{config.port}/{config.db}"
f"?sslmode={config.ssl_mode}&gssencmode={config.gss_encmode}"
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/app/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def test_create_postgres_engine_success_default_schema(
assert result is mock_engine
# Verify URL construction
expected_url = (
"postgresql://testuser:testpass@localhost:5432/testdb?"
"postgresql+psycopg2://testuser:testpass@localhost:5432/testdb?"
"sslmode=prefer&gssencmode=prefer"
)
mock_create_engine.assert_called_once()
Expand Down
Loading