Update tests to use new allowed() method instead of permission_allowed()

This commit is contained in:
Simon Willison 2025-10-24 14:06:05 -07:00
commit 7aaff5e3d2
5 changed files with 211 additions and 6 deletions

View file

@ -696,7 +696,7 @@ async def test_hook_permission_allowed(action, expected):
try:
ds = Datasette(plugins_dir=PLUGINS_DIR)
await ds.invoke_startup()
actual = await ds.permission_allowed({"id": "actor"}, action)
actual = await ds.allowed(action=action, actor={"id": "actor"})
assert expected == actual
finally:
pm.unregister(name="undo_register_extras")