chore: improve db session access (#3138)
* chore: improve db session access * chore: improve db session access * fix * [autofix.ci] apply automated fixes * Refactor session management in test_sqlite_pragmas to use with_session method --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
parent
27b5f55ef9
commit
1c87a804bf
6 changed files with 21 additions and 35 deletions
|
|
@ -407,7 +407,7 @@ def test_migrate_transactions_no_duckdb(client: TestClient):
|
|||
def test_sqlite_pragmas():
|
||||
db_service = get_db_service()
|
||||
|
||||
with db_service as session:
|
||||
with db_service.with_session() as session:
|
||||
from sqlalchemy import text
|
||||
|
||||
assert "wal" == session.execute(text("PRAGMA journal_mode;")).fetchone()[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue