Fix BeautifulSoup's GuessedAtParserWarning

This commit is contained in:
Sajith Sasidharan 2020-12-13 06:49:49 -05:00
parent e59a922b27
commit b787de0acc
3 changed files with 2 additions and 2 deletions

0
newsfragments/3557.minor Normal file
View File

View 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)

View File

@ -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")),