diff --git a/.gitignore b/.gitignore index db68e9b..9b69c0a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,5 @@ docs/_build dpaste/settings/local.py dpaste/static/ dpaste.egg-info -dpaste.db +dpaste.sqlite node_modules diff --git a/dpaste/settings/tests.py b/dpaste/settings/tests.py index 6c3fe0e..7fdf578 100644 --- a/dpaste/settings/tests.py +++ b/dpaste/settings/tests.py @@ -8,3 +8,9 @@ SECRET_KEY = "test-key" DATABASES = { "default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"} } + +# Drop CSP middleware for Django 3.0 until it was fixed upstream +# https://github.com/mozilla/django-csp/issues/129 +import django +if django.get_version().startswith("3."): + MIDDLEWARE.remove("csp.middleware.CSPMiddleware")