mirror of
https://github.com/simonw/datasette.git
synced 2026-10-07 18:06:59 +02:00
/-/plugins.json is now an array of objects again (#2843)
Reverts the object envelope introduced in 1.0a36 for this endpoint - it once again returns a top-level JSON array of plugin objects. Closes #2842 Claude-Session: https://claude.ai/code/session_012TYc1NTBK4zEjabB3u2zqu Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
db82123108
commit
ccace40e5a
6 changed files with 21 additions and 25 deletions
|
|
@ -614,13 +614,13 @@ async def test_plugins_json(ds_client):
|
|||
response = await ds_client.get("/-/plugins.json")
|
||||
# Filter out TrackEventPlugin
|
||||
actual_plugins = sorted(
|
||||
[p for p in response.json()["plugins"] if p["name"] != "TrackEventPlugin"],
|
||||
[p for p in response.json() if p["name"] != "TrackEventPlugin"],
|
||||
key=lambda p: p["name"],
|
||||
)
|
||||
assert EXPECTED_PLUGINS == actual_plugins
|
||||
# Try with ?all=1
|
||||
response = await ds_client.get("/-/plugins.json?all=1")
|
||||
names = {p["name"] for p in response.json()["plugins"]}
|
||||
names = {p["name"] for p in response.json()}
|
||||
assert names.issuperset(p["name"] for p in EXPECTED_PLUGINS)
|
||||
assert names.issuperset(DEFAULT_PLUGINS)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue