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="/-/plugins">Installed plugins</a></li>
|
||||||
<li><a href="/-/versions">Version info</a></li>
|
<li><a href="/-/versions">Version info</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<form action="/-/logout" method="post">
|
<form class="nav-menu-logout" action="/-/logout" method="post">
|
||||||
<button class="button-as-link">Log out</button>
|
<button class="button-as-link">Log out</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -110,7 +110,7 @@ async def test_logout_button_in_navigation(ds_client, path):
|
||||||
anon_response = await ds_client.get(path)
|
anon_response = await ds_client.get(path)
|
||||||
for fragment in (
|
for fragment in (
|
||||||
"<strong>test</strong>",
|
"<strong>test</strong>",
|
||||||
'<form action="/-/logout" method="post">',
|
'<form class="nav-menu-logout" action="/-/logout" method="post">',
|
||||||
):
|
):
|
||||||
assert fragment in response.text
|
assert fragment in response.text
|
||||||
assert fragment not in anon_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):
|
async def test_no_logout_button_in_navigation_if_no_ds_actor_cookie(ds_client, path):
|
||||||
response = await ds_client.get(path + "?_bot=1")
|
response = await ds_client.get(path + "?_bot=1")
|
||||||
assert "<strong>bot</strong>" in response.text
|
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(
|
@pytest.mark.parametrize(
|
||||||
|
|
Ładowanie…
Reference in New Issue