Skip to content

Commit 23c12c2

Browse files
authored
test: fix system engine tests (#365)
1 parent 00e141f commit 23c12c2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/integration/dbapi/async/V2/test_system_engine_async.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ async def test_system_engine(
4848

4949
if connection_system_engine.database:
5050
await c.execute("show tables")
51+
await c.execute(
52+
"create table if not exists test_async(id int) primary index id"
53+
)
5154
with raises(OperationalError):
52-
await c.execute("create table test(id int) primary index id")
55+
await c.execute("insert into test values (1)")
5356
else:
5457
await c.execute("show databases")
5558
with raises(OperationalError):

tests/integration/dbapi/sync/V2/test_system_engine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ def test_system_engine(
4848

4949
if connection_system_engine.database:
5050
c.execute("show tables")
51+
c.execute("create table if not exists test_sync(id int) primary index id")
5152
with raises(OperationalError):
52-
c.execute("create table test(id int) primary index id")
53+
c.execute("insert into test values (1)")
5354
else:
5455
c.execute("show databases")
5556
with raises(OperationalError):

0 commit comments

Comments
 (0)