Skip to content

Commit 1756f64

Browse files
committed
Update tests to use dialect to compile
1 parent 3a42bb2 commit 1756f64

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/pyathena/sqlalchemy/test_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,10 @@ def test_select_offset_limit(self, engine):
359359
rows = conn.execute(many_rows.select().offset(10).limit(5)).fetchall()
360360
assert rows == [(i,) for i in range(10, 15)]
361361

362-
def test_reserved_words(self):
362+
def test_reserved_words(self, engine):
363363
"""Presto uses double quotes, not backticks"""
364364
fake_table = Table("select", MetaData(), Column("current_timestamp", types.String()))
365-
query = str(fake_table.select().where(fake_table.c.current_timestamp == "a"))
365+
query = fake_table.select().where(fake_table.c.current_timestamp == "a").compile(dialect=engine.dialect).string
366366
assert '"select"' in query
367367
assert '"current_timestamp"' in query
368368
assert "`select`" not in query

0 commit comments

Comments
 (0)