Ported app_client to ds_client where possible in test_auth.py, refs #1959

This commit is contained in:
Simon Willison 2022-12-15 14:18:40 -08:00
commit 425ac4357f
6 changed files with 91 additions and 67 deletions

View file

@ -30,3 +30,11 @@ def inner_html(soup):
def has_load_extension():
conn = sqlite3.connect(":memory:")
return hasattr(conn, "enable_load_extension")
def cookie_was_deleted(response, cookie):
return any(
h
for h in response.headers.get_list("set-cookie")
if h.startswith(f'{cookie}="";')
)