Files
edx-platform/lms/envs/load_test.py
Amit 7dfb73c7a6 INCR-483: Make compatible with Python 3.x without breaking Python 2.7 support (#20795)
* reword INCR-483: Make compatible with Python 3.x without breaking Python 2.7 support

pick INCR-483: Re-run isort for lms/envs/test.py

INCR-483: change import order

INCR-483: PyLint fixes

* INCR-483: Fixes useless suppression

* INCR-483: Remove unused get_swagger_view
2019-07-02 12:54:34 -04:00

24 lines
703 B
Python

"""
Settings for load testing.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from __future__ import absolute_import
from six.moves import filter
from .production import *
# Disable CSRF for load testing
EXCLUDE_CSRF = lambda elem: elem not in [
'django.template.context_processors.csrf',
'django.middleware.csrf.CsrfViewMiddleware'
]
DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] = list(filter(
EXCLUDE_CSRF, DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors']
))
MIDDLEWARE_CLASSES = list(filter(EXCLUDE_CSRF, MIDDLEWARE_CLASSES))