mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Improved permissions UI WIP
This commit is contained in:
parent
b3721eaf50
commit
73014abe8b
12 changed files with 417 additions and 335 deletions
|
|
@ -835,8 +835,14 @@ async def test_versions_json(ds_client):
|
|||
|
||||
@pytest.mark.asyncio
|
||||
async def test_actions_json(ds_client):
|
||||
response = await ds_client.get("/-/actions.json")
|
||||
data = response.json()
|
||||
original_root_enabled = ds_client.ds.root_enabled
|
||||
try:
|
||||
ds_client.ds.root_enabled = True
|
||||
cookies = {"ds_actor": ds_client.actor_cookie({"id": "root"})}
|
||||
response = await ds_client.get("/-/actions.json", cookies=cookies)
|
||||
data = response.json()
|
||||
finally:
|
||||
ds_client.ds.root_enabled = original_root_enabled
|
||||
assert isinstance(data, list)
|
||||
assert len(data) > 0
|
||||
# Check structure of first action
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue