kopia lustrzana https://github.com/simonw/datasette
Fix tests I broke in #2302
rodzic
9cc6f1908f
commit
feddd61789
|
@ -26,7 +26,7 @@
|
|||
<li><a href="/-/plugins">Installed plugins</a></li>
|
||||
<li><a href="/-/versions">Version info</a></li>
|
||||
</ul>
|
||||
<form action="/-/logout" method="post">
|
||||
<form class="nav-menu-logout" action="/-/logout" method="post">
|
||||
<button class="button-as-link">Log out</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -110,7 +110,7 @@ async def test_logout_button_in_navigation(ds_client, path):
|
|||
anon_response = await ds_client.get(path)
|
||||
for fragment in (
|
||||
"<strong>test</strong>",
|
||||
'<form action="/-/logout" method="post">',
|
||||
'<form class="nav-menu-logout" action="/-/logout" method="post">',
|
||||
):
|
||||
assert fragment in response.text
|
||||
assert fragment not in anon_response.text
|
||||
|
@ -121,7 +121,10 @@ async def test_logout_button_in_navigation(ds_client, path):
|
|||
async def test_no_logout_button_in_navigation_if_no_ds_actor_cookie(ds_client, path):
|
||||
response = await ds_client.get(path + "?_bot=1")
|
||||
assert "<strong>bot</strong>" in response.text
|
||||
assert '<form action="/-/logout" method="post">' not in response.text
|
||||
assert (
|
||||
'<form class="nav-menu-logout" action="/-/logout" method="post">'
|
||||
not in response.text
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
Ładowanie…
Reference in New Issue