Raise an exception if a "plugins" block exists in metadata.json

This commit is contained in:
Alex Garcia 2023-10-12 09:20:50 -07:00 committed by GitHub
commit 3d6d1e3050
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 3 deletions

View file

@ -879,6 +879,14 @@ def test_hook_forbidden(restore_working_directory):
)
def test_plugin_config_in_metadata():
with pytest.raises(
Exception,
match="Datasette no longer accepts plugin configuration in --metadata",
):
Datasette(memory=True, metadata={"plugins": {}})
@pytest.mark.asyncio
async def test_hook_handle_exception(ds_client):
await ds_client.get("/trigger-error?x=123")