Fix Django 3.0 tests with CSP issues

This commit is contained in:
Martin Mahner 2019-12-07 12:05:53 +01:00
parent 6d8c0fd78e
commit e3d4725e52
2 changed files with 7 additions and 1 deletions

2
.gitignore vendored
View file

@ -4,5 +4,5 @@ docs/_build
dpaste/settings/local.py dpaste/settings/local.py
dpaste/static/ dpaste/static/
dpaste.egg-info dpaste.egg-info
dpaste.db dpaste.sqlite
node_modules node_modules

View file

@ -8,3 +8,9 @@ SECRET_KEY = "test-key"
DATABASES = { DATABASES = {
"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"} "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")