Merge pull request from sajith/3557.GuessedAtParserWarning

Fix BeautifulSoup's GuessedAtParserWarning

Fixes: ticket:3557
This commit is contained in:
Jean-Paul Calderone 2020-12-15 07:50:56 -05:00 committed by GitHub
commit 7458ea6345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 2 deletions
newsfragments
src/allmydata/test

0
newsfragments/3557.minor Normal file

@ -144,7 +144,7 @@ class WebResultsRendering(unittest.TestCase):
@staticmethod
def remove_tags(html):
return BeautifulSoup(html).get_text(separator=" ")
return BeautifulSoup(html, 'html5lib').get_text(separator=" ")
def create_fake_client(self):
sb = StorageFarmBroker(True, None, EMPTY_CLIENT_CONFIG)

@ -160,7 +160,7 @@ class RenderExceptionTests(SyncTestCase):
MatchesPredicate(
lambda value: assert_soup_has_tag_with_attributes(
self,
BeautifulSoup(value),
BeautifulSoup(value, 'html5lib'),
"meta",
{"http-equiv": "refresh",
"content": "0;URL={}".format(loc.encode("ascii")),