Skip to content

Commit

Permalink
Fix column defaults test for MySQL
Browse files Browse the repository at this point in the history
MySQL does not delete any rows without a where clause.
  • Loading branch information
GarbageHamburger committed May 4, 2020
1 parent dcf3378 commit 9d9080a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,9 @@ async def test_column_defaults(database_url):
await database.execute(query)
results = await database.fetch_all(query=timestamps.select())
assert len(results) == 1
await database.execute(timestamps.delete())
await database.execute(
timestamps.delete(timestamps.c.id == results[0]["id"])
)

# with default value overridden
dt = datetime.datetime.now() - datetime.timedelta(seconds=10)
Expand Down

0 comments on commit 9d9080a

Please sign in to comment.