Skip to content

Commit 5041972

Browse files
john-bodleyebyhr
authored andcommitted
Fix has_schema arguments in SQLAlchemy test
1 parent 2f0e382 commit 5041972

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/integration/test_sqlalchemy_integration.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_select_specific_columns(trino_connection):
8181
@pytest.mark.parametrize('trino_connection', ['memory'], indirect=True)
8282
def test_define_and_create_table(trino_connection):
8383
engine, conn = trino_connection
84-
if not engine.dialect.has_schema(engine, "test"):
84+
if not engine.dialect.has_schema(conn, "test"):
8585
engine.execute(sqla.schema.CreateSchema("test"))
8686
metadata = sqla.MetaData()
8787
try:
@@ -109,7 +109,7 @@ def test_define_and_create_table(trino_connection):
109109
def test_insert(trino_connection):
110110
engine, conn = trino_connection
111111

112-
if not engine.dialect.has_schema(engine, "test"):
112+
if not engine.dialect.has_schema(conn, "test"):
113113
engine.execute(sqla.schema.CreateSchema("test"))
114114
metadata = sqla.MetaData()
115115
try:
@@ -138,7 +138,7 @@ def test_insert(trino_connection):
138138
@pytest.mark.parametrize('trino_connection', ['memory'], indirect=True)
139139
def test_insert_multiple_statements(trino_connection):
140140
engine, conn = trino_connection
141-
if not engine.dialect.has_schema(engine, "test"):
141+
if not engine.dialect.has_schema(conn, "test"):
142142
engine.execute(sqla.schema.CreateSchema("test"))
143143
metadata = sqla.MetaData()
144144
users = sqla.Table('users',
@@ -322,7 +322,7 @@ def test_cte(trino_connection):
322322
def test_json_column(trino_connection, json_object):
323323
engine, conn = trino_connection
324324

325-
if not engine.dialect.has_schema(engine, "test"):
325+
if not engine.dialect.has_schema(conn, "test"):
326326
engine.execute(sqla.schema.CreateSchema("test"))
327327
metadata = sqla.MetaData()
328328

@@ -350,7 +350,7 @@ def test_json_column(trino_connection, json_object):
350350
def test_get_table_comment(trino_connection):
351351
engine, conn = trino_connection
352352

353-
if not engine.dialect.has_schema(engine, "test"):
353+
if not engine.dialect.has_schema(conn, "test"):
354354
engine.execute(sqla.schema.CreateSchema("test"))
355355
metadata = sqla.MetaData()
356356

0 commit comments

Comments
 (0)