Fix BeautifulSoup deprecation warnings in tests

Fixes findNext → find_next and nextSibling → next_sibling

Refs 9becb04e
This commit is contained in:
Simon Willison 2025-11-05 09:49:10 -08:00
commit f626983fdb
2 changed files with 2 additions and 2 deletions

View file

@ -333,7 +333,7 @@ def test_row_links_from_other_tables(app_client, path, expected_text, expected_l
soup = Soup(response.body, "html.parser")
h2 = soup.find("h2")
assert h2.text == "Links from other tables"
li = h2.findNext("ul").find("li")
li = h2.find_next("ul").find("li")
text = re.sub(r"\s+", " ", li.text.strip())
assert text == expected_text
link = li.find("a")["href"]