mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
7633b9ab24
commit
5ef3b7b0c9
1 changed files with 5 additions and 9 deletions
|
|
@ -309,14 +309,10 @@ def test_permissions_debug(app_client):
|
|||
] == checks
|
||||
|
||||
|
||||
@pytest.mark.parametrize("allow,expected", [
|
||||
({"id": "root"}, 403),
|
||||
({"id": "root", "unauthenticated": True}, 200),
|
||||
])
|
||||
@pytest.mark.parametrize(
|
||||
"allow,expected",
|
||||
[({"id": "root"}, 403), ({"id": "root", "unauthenticated": True}, 200),],
|
||||
)
|
||||
def test_allow_unauthenticated(allow, expected):
|
||||
with make_app_client(
|
||||
metadata={
|
||||
"allow": allow
|
||||
}
|
||||
) as client:
|
||||
with make_app_client(metadata={"allow": allow}) as client:
|
||||
assert expected == client.get("/").status
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue