load_test.py 610 Bytes
Newer Older
1 2 3 4 5 6
"""
Settings for load testing.
"""

# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
7
# pylint: disable=wildcard-import, unused-wildcard-import
8 9 10 11

from .aws import *

# Disable CSRF for load testing
David Baumgold committed
12
EXCLUDE_CSRF = lambda elem: elem not in [
13 14 15
    'django.core.context_processors.csrf',
    'django.middleware.csrf.CsrfViewMiddleware'
]
16 17 18
DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] = filter(
    EXCLUDE_CSRF, DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors']
)
19
MIDDLEWARE_CLASSES = filter(EXCLUDE_CSRF, MIDDLEWARE_CLASSES)