Skip to content

Commit

Permalink
🧪 add another settings test
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshix-1 committed Aug 8, 2024
1 parent 80ebc3f commit ba3fb3b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ async def test_setting_stuff_without_cookies(
follow_redirects=True,
)
assert_valid_response(response, content_type="text/html;charset=utf-8")

assert_url_query(
response.effective_url,
theme="pink",
Expand All @@ -92,6 +93,19 @@ async def test_setting_stuff_without_cookies(
bumpscosity="0",
)

root = HTMLParser(namespaceHTMLElements=False).parse(response.body)
home_url = root.xpath("//*[@id='back-to-home']")[0].get("href")

assert_url_query(
home_url,
theme="pink",
no_3rd_party="sure",
dynload="sure",
openmoji="img",
save_in_cookie=None,
bumpscosity="0",
)


def parse_cookie(cookie: str) -> SimpleCookie:
"""Parse a cookie string to a SimpleCookie."""
Expand Down

0 comments on commit ba3fb3b

Please sign in to comment.