Skip to content

Commit

Permalink
Fix column defaults test for MySQL
Browse files Browse the repository at this point in the history
MySQL rounds datetimes to seconds.
  • Loading branch information
GarbageHamburger committed May 4, 2020
1 parent dcf3378 commit f66013e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,8 @@ async def test_column_defaults(database_url):
await database.execute(timestamps.delete())

# with default value overridden
dt = datetime.datetime.now() - datetime.timedelta(seconds=10)
dt = datetime.datetime.now()
dt -= datetime.timedelta(seconds=10, microseconds=dt.microsecond)
values = {"timestamp": dt}
await database.execute(query, values)
results = await database.fetch_all(timestamps.select())
Expand Down

0 comments on commit f66013e

Please sign in to comment.