We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9eb523 commit 18ee46aCopy full SHA for 18ee46a
1 file changed
controller/deis/settings.py
@@ -4,6 +4,8 @@
4
5
from __future__ import unicode_literals
6
import os.path
7
+import random
8
+import string
9
import sys
10
import tempfile
11
@@ -303,6 +305,9 @@
303
305
'default': {
304
306
'ENGINE': 'django.db.backends.' + os.environ.get('DATABASE_ENGINE', 'postgresql_psycopg2'),
307
'NAME': os.environ.get('DATABASE_NAME', 'deis'),
308
+ # randomize test database name so we can run multiple unit tests simultaneously
309
+ 'TEST_NAME': "unittest-{}".format(''.join(
310
+ random.choice(string.ascii_letters + string.digits) for _ in range(8)))
311
}
312
313
0 commit comments