]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Remove django-debug-toolbar from test requirements
authorStephen Finucane <stephen@that.guru>
Thu, 13 Sep 2018 21:20:42 +0000 (15:20 -0600)
committerStephen Finucane <stephen@that.guru>
Wed, 10 Oct 2018 09:17:36 +0000 (10:17 +0100)
This should speed up tests slightly and remove an unnecessary
dependency.

Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/settings/dev.py
requirements-dev.txt
requirements-test.txt

index 711177c94730196ca4f74044cb431e1f4f9cdcbf..53fa58f65a489275dd9569d3d36f2305383ea812 100644 (file)
@@ -14,6 +14,11 @@ try:
 except ImportError:
     dbbackup = None
 
+try:
+    import debug_toolbar
+except ImportError:
+    debug_toolbar = None
+
 #
 # Core settings
 # https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings
@@ -61,21 +66,22 @@ PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher']
 
 # django-debug-toolbar
 
-INSTALLED_APPS += [
-    'debug_toolbar'
-]
+if debug_toolbar:
+    INSTALLED_APPS += [
+        'debug_toolbar'
+    ]
 
-DEBUG_TOOLBAR_PATCH_SETTINGS = False
+    DEBUG_TOOLBAR_PATCH_SETTINGS = False
 
 # This should go first in the middleware classes
-MIDDLEWARE = [
-    'debug_toolbar.middleware.DebugToolbarMiddleware',
-] + MIDDLEWARE
-
-INTERNAL_IPS = [
-    '127.0.0.1', '::1',
-    '172.18.0.1'
-]
+    MIDDLEWARE = [
+        'debug_toolbar.middleware.DebugToolbarMiddleware',
+    ] + MIDDLEWARE
+
+    INTERNAL_IPS = [
+        '127.0.0.1', '::1',
+        '172.18.0.1'
+    ]
 
 # django-dbbackup
 
index ed98c30ec86b3dd6fcfdead0669583eac1855b24..994b9b682d5a0b2f8e433667a7eb8aeb6c84cf91 100644 (file)
@@ -3,5 +3,6 @@ Django==1.11.15; python_version < '3.0'  # pyup: ignore
 djangorestframework==3.8.2
 django-filter==2.0.0; python_version >= '3.4'
 django-filter==1.1.0; python_version < '3.0'  # pyup: ignore
+django-debug-toolbar==1.10.1
 django-dbbackup==3.2.0
 -r requirements-test.txt
index 1deb86abeb6a34a0fe8e6c632263dd4535594c24..6203355192beccf3f70d3032807f02a37905ee23 100644 (file)
@@ -1,4 +1,3 @@
 mysqlclient==1.3.13
 psycopg2-binary==2.7.5
-django-debug-toolbar==1.10.1
 python-dateutil==2.7.3