mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Respect existing scope["actor"] if set, closes #854
This commit is contained in:
parent
d2aef9f7ef
commit
6151c25a5a
4 changed files with 22 additions and 1 deletions
|
|
@ -534,6 +534,11 @@ def test_actor_from_request_async(app_client):
|
|||
assert {"id": "bot2", "1+1": 2} == app_client.ds._last_request.scope["actor"]
|
||||
|
||||
|
||||
def test_existing_scope_actor_respected(app_client):
|
||||
app_client.get("/?_actor_in_scope=1")
|
||||
assert {"id": "from-scope"} == app_client.ds._last_request.scope["actor"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
"action,expected",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue