1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From: Carsten Schoenert <c.schoenert@t-online.de>
Date: Sun, 26 May 2024 11:25:51 +0200
Subject: tests: Use SQLAlchemy 2.x syntax for select()
Since SQLAlchemy 2.0 the legacy format select[SOMETHING] isn't usable
anymore, version 1.4 introduced the newer format select(SOMETHING) and
allowed the usage of both formats for migration.
https://docs.sqlalchemy.org/en/20/errors.html#error-b8d9
---
tests/test_now.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_now.py b/tests/test_now.py
index 93470e5..8ea9ee6 100644
--- a/tests/test_now.py
+++ b/tests/test_now.py
@@ -28,7 +28,7 @@ def fx_connection(fx_engine):
def test_utcnow_timezone(fx_connection):
fx_connection.execute(TABLE.insert(), [{}])
- rows = fx_connection.execute(select([TABLE])).fetchall()
+ rows = fx_connection.execute(select(TABLE)).fetchall()
server_now = rows[0].time
local_now = datetime.datetime.now(utc)
assert server_now.tzinfo is not None
|