Skip to content

Commit 0f7e26e

Browse files
committed
fix test_loader
1 parent f154234 commit 0f7e26e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

mysql_tests/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Team(db.Model):
7979

8080
id = db.Column(db.BigInteger(), primary_key=True)
8181
name = db.Column(db.Unicode(255), default=_random_name)
82-
parent_id = db.Column(db.ForeignKey("gino_teams.id"))
82+
parent_id = db.Column(db.ForeignKey("gino_teams.id", ondelete='CASCADE'))
8383
company_id = db.Column(db.ForeignKey("gino_companies.id"))
8484

8585
def __init__(self, **kw):

mysql_tests/test_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ async def test_literal(user):
281281
sample = tuple(random.random() for _ in range(5))
282282
now = db.Column("time", db.DateTime())
283283
row = await db.first(
284-
db.text("SELECT now() AT TIME ZONE 'UTC'")
284+
db.text("SELECT UTC_TIMESTAMP")
285285
.columns(now)
286286
.gino.load(sample + (lambda r, c: datetime.utcnow(), now))
287287
.query

0 commit comments

Comments
 (0)