mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Call _prepare_connection() on write connections, closes #1564
This commit is contained in:
parent
c35b84a2aa
commit
83bacfa945
2 changed files with 7 additions and 0 deletions
|
|
@ -396,6 +396,12 @@ async def test_execute_write_block_false(db):
|
|||
assert "Mystery!" == rows.rows[0][0]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_execute_write_has_correctly_prepared_connection(db):
|
||||
# The sleep() function is only available if ds._prepare_connection() was called
|
||||
await db.execute_write("select sleep(0.01)", block=True)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_execute_write_fn_block_false(db):
|
||||
def write_fn(conn):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue