diff --git a/cms/envs/test.py b/cms/envs/test.py index 86925caff6..98a8272eda 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -16,6 +16,10 @@ from .common import * import os from path import path + +def seed(): + return os.getppid() + # Nose Test Runner INSTALLED_APPS += ('django_nose',) TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' @@ -46,7 +50,7 @@ MODULESTORE_OPTIONS = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'host': 'localhost', 'db': 'test_xmodule', - 'collection': 'test_modulestore', + 'collection': 'test_modulestore_%s' % seed(), 'fs_root': TEST_ROOT / "data", 'render_template': 'mitxmako.shortcuts.render_to_string', } @@ -70,7 +74,7 @@ CONTENTSTORE = { 'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore', 'OPTIONS': { 'host': 'localhost', - 'db': 'test_xcontent', + 'db': 'test_xcontent_%s' % seed(), }, # allow for additional options that can be keyed on a name, e.g. 'trashcan' 'ADDITIONAL_OPTIONS': { @@ -83,7 +87,7 @@ CONTENTSTORE = { DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': TEST_ROOT / "db" / "cms.db", + 'NAME': TEST_ROOT / "db" / "cms_%s.db" % seed(), }, } diff --git a/lms/envs/test.py b/lms/envs/test.py index f23be52a51..8fbd271daf 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -16,6 +16,9 @@ from .common import * import os from path import path +def seed(): + return os.getppid() + # can't test start dates with this True, but on the other hand, # can test everything else :) MITX_FEATURES['DISABLE_START_DATES'] = True @@ -101,7 +104,7 @@ MODULESTORE = { DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': TEST_ROOT / 'db' / 'mitx.db' + 'NAME': TEST_ROOT / 'db' / 'mitx_%s.db' % seed() }, }