summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_dialect.py
diff options
context:
space:
mode:
authorGord Thompson <gord@gordthompson.com>2021-06-24 12:16:32 -0600
committerMike Bayer <mike_mp@zzzcomputing.com>2021-07-03 18:50:03 -0400
commitb920869ef54d05e73e2a980b73647d6050ffeb9d (patch)
tree907f866bf583038751a450e9c6249ef6ff3d0111 /test/dialect/postgresql/test_dialect.py
parentcb9f6f83b21b9e65db6cf1ce74f55ecfd0907735 (diff)
downloadsqlalchemy-b920869ef54d05e73e2a980b73647d6050ffeb9d.tar.gz
Modernize tests
Eliminate engine.execute() and engine.scalar() Change-Id: I99f76d0e615ddebab2da4fd07a40a0a2796995c7
Diffstat (limited to 'test/dialect/postgresql/test_dialect.py')
-rw-r--r--test/dialect/postgresql/test_dialect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py
index 5a53e0b7e..371a17819 100644
--- a/test/dialect/postgresql/test_dialect.py
+++ b/test/dialect/postgresql/test_dialect.py
@@ -1117,9 +1117,9 @@ $$ LANGUAGE plpgsql;
)
def test_extract(self, connection):
- fivedaysago = testing.db.scalar(
+ fivedaysago = connection.execute(
select(func.now().op("at time zone")("UTC"))
- ) - datetime.timedelta(days=5)
+ ).scalar() - datetime.timedelta(days=5)
for field, exp in (
("year", fivedaysago.year),