Skip to content

Commit

Permalink
Fixed BeautifulSoup and Django warnings (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyve committed Apr 18, 2024
1 parent 5175b87 commit 01485f8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ VERSION := $(shell sed -n 's/^ *version.*=.*"\([^"]*\)".*/\1/p' pyproject.toml)

.PHONY: test
test:
coverage run manage.py test
PYTHONWARNINGS=all coverage run manage.py test
coverage report

.PHONY: tests
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
]
dependencies = [
"Django>=4.2",
"beautifulsoup4>=4.8.0",
"beautifulsoup4>=4.10.0",
]
description = "Django extensions by Zostera"
keywords = ["django", "utilities", "testing"]
Expand Down
2 changes: 1 addition & 1 deletion src/django_marina/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ def remove_attrs(html, attrs=None):

def _remove_attrs(soup, attrs):
for attr in attrs:
for tag in soup.findAll(attrs={attr: True}):
for tag in soup.find_all(attrs={attr: True}):
del tag.attrs[attr]
return soup
2 changes: 1 addition & 1 deletion tests/app/settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SECRET_KEY = "Thanks for using django-marina!"

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

USE_TZ = True
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}

INSTALLED_APPS = (
Expand Down

0 comments on commit 01485f8

Please sign in to comment.