From ab235be2fc9270d17473119cf444eb83715e35bb Mon Sep 17 00:00:00 2001 From: Joseph Nuthalpati Date: Thu, 7 Sep 2017 14:15:41 +0530 Subject: [PATCH] captcha: fix tests failing to start Signed-off-by: Joseph Nuthalpati Reviewed-by: James Valleroy --- plinth/__main__.py | 20 +++++++++++--------- plinth/tests/data/django_test_settings.py | 14 +++++++++----- requirements.txt | 1 + 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/plinth/__main__.py b/plinth/__main__.py index f351bd682..07ca19905 100644 --- a/plinth/__main__.py +++ b/plinth/__main__.py @@ -161,7 +161,7 @@ def on_server_stop(): def configure_django(): - """Setup Django configuration in the absense of .settings file""" + """Setup Django configuration in the absence of .settings file""" logging_configuration = { 'version': 1, 'disable_existing_loggers': False, @@ -208,14 +208,16 @@ def configure_django(): }, ] - applications = ['bootstrapform', - 'captcha', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.messages', - 'stronghold', - 'plinth', - 'axes'] + applications = [ + 'axes', + 'captcha', + 'bootstrapform', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.messages', + 'stronghold', + 'plinth', + ] applications += module_loader.get_modules_to_load() sessions_directory = os.path.join(cfg.data_dir, 'sessions') diff --git a/plinth/tests/data/django_test_settings.py b/plinth/tests/data/django_test_settings.py index 8edf1df15..be20080c1 100644 --- a/plinth/tests/data/django_test_settings.py +++ b/plinth/tests/data/django_test_settings.py @@ -30,11 +30,15 @@ DATABASES = { } } -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'plinth', -) +INSTALLED_APPS = [ + 'captcha', + 'bootstrapform', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.messages', + 'stronghold', + 'plinth', + ] # These are included here solely to suppress Django warnings # during testing setup diff --git a/requirements.txt b/requirements.txt index 21d38314f..0264ea2c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ cherrypy >= 3.0 configobj coverage >= 3.7 django >= 1.11.0 +django-axes django-bootstrap-form django-simple-captcha django-stronghold