captcha: fix tests failing to start

Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalpati 2017-09-07 14:15:41 +05:30 committed by James Valleroy
parent 03e1006dc3
commit ab235be2fc
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 21 additions and 14 deletions

View File

@ -161,7 +161,7 @@ def on_server_stop():
def configure_django(): def configure_django():
"""Setup Django configuration in the absense of .settings file""" """Setup Django configuration in the absence of .settings file"""
logging_configuration = { logging_configuration = {
'version': 1, 'version': 1,
'disable_existing_loggers': False, 'disable_existing_loggers': False,
@ -208,14 +208,16 @@ def configure_django():
}, },
] ]
applications = ['bootstrapform', applications = [
'captcha', 'axes',
'django.contrib.auth', 'captcha',
'django.contrib.contenttypes', 'bootstrapform',
'django.contrib.messages', 'django.contrib.auth',
'stronghold', 'django.contrib.contenttypes',
'plinth', 'django.contrib.messages',
'axes'] 'stronghold',
'plinth',
]
applications += module_loader.get_modules_to_load() applications += module_loader.get_modules_to_load()
sessions_directory = os.path.join(cfg.data_dir, 'sessions') sessions_directory = os.path.join(cfg.data_dir, 'sessions')

View File

@ -30,11 +30,15 @@ DATABASES = {
} }
} }
INSTALLED_APPS = ( INSTALLED_APPS = [
'django.contrib.auth', 'captcha',
'django.contrib.contenttypes', 'bootstrapform',
'plinth', 'django.contrib.auth',
) 'django.contrib.contenttypes',
'django.contrib.messages',
'stronghold',
'plinth',
]
# These are included here solely to suppress Django warnings # These are included here solely to suppress Django warnings
# during testing setup # during testing setup

View File

@ -2,6 +2,7 @@ cherrypy >= 3.0
configobj configobj
coverage >= 3.7 coverage >= 3.7
django >= 1.11.0 django >= 1.11.0
django-axes
django-bootstrap-form django-bootstrap-form
django-simple-captcha django-simple-captcha
django-stronghold django-stronghold