diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-10-12 23:02:12 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-10-12 23:02:45 -0400 |
| commit | ed735af55d2c863cbe7cfde7b4ef3a9cda7c0733 (patch) | |
| tree | 7cf80a399b4377bde6ebd36758338daf8911713a /test/dialect | |
| parent | f614a57e108e9da1070a96fe567bc7cada2d29d4 (diff) | |
| download | sqlalchemy-ed735af55d2c863cbe7cfde7b4ef3a9cda7c0733.tar.gz | |
- get the "now" date for this test in terms of the database to accommodate
for local timezone doesn't match that of the DB
Change-Id: I0899d9294e8a2bd8f7f2c3e66cf396e2e8bd4bcc
(cherry picked from commit 7405392299492c83e6fa1546d3b36f52042e3c5e)
Diffstat (limited to 'test/dialect')
| -rw-r--r-- | test/dialect/postgresql/test_dialect.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index 446765872..4aa5ccec9 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -181,8 +181,8 @@ class MiscBackendTest( "Can't infer the SQL type to use for an instance " "of org.python.core.PyObjectDerived.") def test_extract(self): - fivedaysago = datetime.datetime.now() \ - - datetime.timedelta(days=5) + fivedaysago = testing.db.scalar(select([func.now()])) - \ + datetime.timedelta(days=5) for field, exp in ('year', fivedaysago.year), \ ('month', fivedaysago.month), ('day', fivedaysago.day): r = testing.db.execute( |
