From 5d05b4ea7c05d53810ba033ce2f94c542dd6fe80 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 25 May 2018 03:24:27 -0400 Subject: [PATCH] Use list comprehension to disable the whitenoise runserver static server. Signed-off-by: Roberto Rosario --- mayan/settings/testing/base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mayan/settings/testing/base.py b/mayan/settings/testing/base.py index 756a9efd1b..617da6cd62 100644 --- a/mayan/settings/testing/base.py +++ b/mayan/settings/testing/base.py @@ -3,7 +3,10 @@ from __future__ import absolute_import, unicode_literals from .. import * # NOQA INSTALLED_APPS += ('test_without_migrations',) -INSTALLED_APPS -= ('whitenoise.runserver_nostatic',) + +INSTALLED_APPS = [ + cls for cls in INSTALLED_APPS if cls != 'whitenoise.runserver_nostatic' +] COMMON_PRODUCTION_ERROR_LOG_PATH = '/tmp/mayan-errors.log' @@ -15,7 +18,7 @@ TEMPLATES[0]['OPTIONS']['loaders'] = ( # Remove whitenoise from middlewares. Causes out of memory errors during test # suit MIDDLEWARE_CLASSES = [ - cls for cls in MIDDLEWARE_CLASSES if cls !='whitenoise.middleware.WhiteNoiseMiddleware' + cls for cls in MIDDLEWARE_CLASSES if cls != 'whitenoise.middleware.WhiteNoiseMiddleware' ] STATICFILES_STORAGE = None