mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Don't run prepare_connection() on internal database, closes #2468
This commit is contained in:
parent
e59fd01757
commit
209bdee0e8
3 changed files with 13 additions and 3 deletions
|
|
@ -59,6 +59,11 @@ async def test_hook_plugin_prepare_connection_arguments(ds_client):
|
|||
"database=fixtures, datasette.plugin_config(\"name-of-plugin\")={'depth': 'root'}"
|
||||
] == response.json()
|
||||
|
||||
# Function should not be available on the internal database
|
||||
db = ds_client.ds.get_internal_database()
|
||||
with pytest.raises(sqlite3.OperationalError):
|
||||
await db.execute("select prepare_connection_args()")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue