Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions tests/contrib/asyncpg/test_asyncpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,22 @@ def test_patch_unpatch_patch_cycle():


@pytest.mark.asyncio
async def test_execute_after_patch_unpatch_patch(patched_conn):
async def test_execute_after_patch_unpatch_patch():
# Regression: executing a query must succeed after patch/unpatch/patch.
unpatch()
patch()
await patched_conn.execute("SELECT 1")

conn = await asyncpg.connect(
host=POSTGRES_CONFIG["host"],
port=POSTGRES_CONFIG["port"],
user=POSTGRES_CONFIG["user"],
database=POSTGRES_CONFIG["dbname"],
password=POSTGRES_CONFIG["password"],
)
try:
await conn.execute("SELECT 1")
finally:
await conn.close()


class AsyncPgTestCase(AsyncioTestCase):
Expand Down
Loading