Browse Source

Add an alternate settings module dedicated to unit tests.

Jocelyn Delalande 8 years ago
parent
commit
6a43379886
2 changed files with 12 additions and 1 deletions
  1. 1 1
      README.md
  2. 11 0
      coin/settings_test.py

+ 1 - 1
README.md

@@ -120,7 +120,7 @@ Running tests
 
 There is a set of unit tests you can run with :
 
-    ./manage.py test
+    DJANGO_SETTINGS_MODULE=coin.settings_test ./manage.py test
 
 LDAP-related tests are disabled by default.
 

+ 11 - 0
coin/settings_test.py

@@ -0,0 +1,11 @@
+from settings_base import *
+
+# settings for unit tests
+
+EXTRA_INSTALLED_APPS = (
+    'hardware_provisioning',
+    'vpn',
+)
+
+TEMPLATE_DIRS = EXTRA_TEMPLATE_DIRS + TEMPLATE_DIRS
+INSTALLED_APPS = INSTALLED_APPS + EXTRA_INSTALLED_APPS