mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Better titles for canned query pages, closes #887
This commit is contained in:
parent
f1f581b7ff
commit
57879dc8b3
3 changed files with 10 additions and 3 deletions
|
|
@ -179,13 +179,13 @@ def test_view_query(allow, expected_anon, expected_auth):
|
|||
assert expected_anon == anon_response.status
|
||||
if allow and anon_response.status == 200:
|
||||
# Should be no padlock
|
||||
assert ">fixtures 🔒</h1>" not in anon_response.text
|
||||
assert "🔒</h1>" not in anon_response.text
|
||||
auth_response = client.get(
|
||||
"/fixtures/q", cookies={"ds_actor": client.actor_cookie({"id": "root"})}
|
||||
)
|
||||
assert expected_auth == auth_response.status
|
||||
if allow and expected_anon == 403 and expected_auth == 200:
|
||||
assert ">fixtures 🔒</h1>" in auth_response.text
|
||||
assert ">fixtures: q 🔒</h1>" in auth_response.text
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue