Navigation menu plus menu_links() hook

Closes #1064, refs #690.
This commit is contained in:
Simon Willison 2020-10-29 20:45:15 -07:00 committed by GitHub
commit 18a64fbb29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 193 additions and 13 deletions

View file

@ -101,7 +101,7 @@ def test_logout_button_in_navigation(app_client, path):
)
anon_response = app_client.get(path)
for fragment in (
"<strong>test</strong> &middot;",
"<strong>test</strong>",
'<form action="/-/logout" method="post">',
):
assert fragment in response.text
@ -112,5 +112,4 @@ def test_logout_button_in_navigation(app_client, path):
def test_no_logout_button_in_navigation_if_no_ds_actor_cookie(app_client, path):
response = app_client.get(path + "?_bot=1")
assert "<strong>bot</strong>" in response.text
assert "<strong>bot</strong> &middot;" not in response.text
assert '<form action="/-/logout" method="post">' not in response.text