mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix for text None shown on /-/actions, closes #2599
This commit is contained in:
parent
2125115cd9
commit
68f1179bac
2 changed files with 16 additions and 1 deletions
|
|
@ -1194,6 +1194,21 @@ async def test_actions_page(ds_client):
|
|||
ds_client.ds.root_enabled = original_root_enabled
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_actions_page_does_not_display_none_string(ds_client):
|
||||
"""Ensure the Resource column doesn't display the string 'None' for null values."""
|
||||
# https://github.com/simonw/datasette/issues/2599
|
||||
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", cookies=cookies)
|
||||
assert response.status_code == 200
|
||||
assert "<code>None</code>" not in response.text
|
||||
finally:
|
||||
ds_client.ds.root_enabled = original_root_enabled
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_permission_debug_tabs_with_query_string(ds_client):
|
||||
"""Test that navigation tabs persist query strings across Check, Allowed, and Rules pages"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue