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
|
] == checks
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("allow,expected", [
|
@pytest.mark.parametrize(
|
||||||
({"id": "root"}, 403),
|
"allow,expected",
|
||||||
({"id": "root", "unauthenticated": True}, 200),
|
[({"id": "root"}, 403), ({"id": "root", "unauthenticated": True}, 200),],
|
||||||
])
|
)
|
||||||
def test_allow_unauthenticated(allow, expected):
|
def test_allow_unauthenticated(allow, expected):
|
||||||
with make_app_client(
|
with make_app_client(metadata={"allow": allow}) as client:
|
||||||
metadata={
|
|
||||||
"allow": allow
|
|
||||||
}
|
|
||||||
) as client:
|
|
||||||
assert expected == client.get("/").status
|
assert expected == client.get("/").status
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue