Skip to content

Commit

Permalink
Merge pull request #294 from makinacorpus/fix_log_beautifulsoup
Browse files Browse the repository at this point in the history
Dev: Avoid test warning by using right parsing rules for beautifulsoup
  • Loading branch information
submarcos authored Mar 20, 2024
2 parents 1ef7b03 + 3623d12 commit 38cd5b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mapentity/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def extract_attributes_html(url, request):
response = func(request, *args, **kwargs)
response.render()

soup = bs4.BeautifulSoup(response.content, 'lxml')
soup = bs4.BeautifulSoup(response.content, features='html.parser')
details = soup.find(id="properties")
if details is None:
raise ValueError('Content is of detail page is invalid')
Expand Down
2 changes: 1 addition & 1 deletion mapentity/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def test_gpx_elevation(self):
return # Abstract test should not run
obj = self.modelfactory.create()
response = self.client.get(self.model.get_format_list_url() + '?format=gpx')
parsed = BeautifulSoup(response.content, 'lxml')
parsed = BeautifulSoup(response.content, features='xml')
if hasattr(obj, 'geom_3d'):
self.assertGreater(len(parsed.findAll('ele')), 0)
else:
Expand Down

0 comments on commit 38cd5b9

Please sign in to comment.