Run black formatter

This commit is contained in:
Simon Willison 2025-10-25 08:45:10 -07:00
commit 60a38cee85
14 changed files with 222 additions and 80 deletions

View file

@ -358,18 +358,12 @@ async def test_root_with_root_enabled_gets_all_permissions(ds_client):
# Test instance-level permissions (no resource)
assert (
await ds_client.ds.allowed(action="permissions-debug", actor=root_actor)
is True
await ds_client.ds.allowed(action="permissions-debug", actor=root_actor) is True
)
assert await ds_client.ds.allowed(action="debug-menu", actor=root_actor) is True
# Test view permissions using the new ds.allowed() method
assert (
await ds_client.ds.allowed(
action="view-instance", actor=root_actor
)
is True
)
assert await ds_client.ds.allowed(action="view-instance", actor=root_actor) is True
assert (
await ds_client.ds.allowed(
@ -462,10 +456,7 @@ async def test_root_without_root_enabled_no_special_permissions(ds_client):
# View permissions should still work (default=True)
assert (
await ds_client.ds.allowed(
action="view-instance", actor=root_actor
)
is True
await ds_client.ds.allowed(action="view-instance", actor=root_actor) is True
) # Default permission
assert (
@ -479,9 +470,7 @@ async def test_root_without_root_enabled_no_special_permissions(ds_client):
# But restricted permissions should NOT automatically be granted
# Test with instance-level permission (no resource class)
result = await ds_client.ds.allowed(
action="permissions-debug", actor=root_actor
)
result = await ds_client.ds.allowed(action="permissions-debug", actor=root_actor)
assert (
result is not True
), "Root without root_enabled should not automatically get permissions-debug"