From 36fb8f91e063b234c0b71cd323e2b4cc5595fe39 Mon Sep 17 00:00:00 2001 From: Will Daly Date: Tue, 14 May 2013 12:45:38 -0400 Subject: [PATCH] Acceptance tests now use the same mongo db as the unit test suite. The LMS/CMS acceptance tests both use the collection acceptance_modules --- cms/envs/acceptance.py | 32 +++++++++++++++++++++++--------- lms/envs/acceptance.py | 2 +- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index 138d318241..28a99c5e48 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -11,16 +11,30 @@ DEBUG = True # Show the courses that are in the data directory COURSES_ROOT = ENV_ROOT / "data" DATA_DIR = COURSES_ROOT -# MODULESTORE = { -# 'default': { -# 'ENGINE': 'xmodule.modulestore.xml.XMLModuleStore', -# 'OPTIONS': { -# 'data_dir': DATA_DIR, -# 'default_class': 'xmodule.hidden_module.HiddenDescriptor', -# } -# } -# } +MODULESTORE_OPTIONS = { + 'default_class': 'xmodule.raw_module.RawDescriptor', + 'host': 'localhost', + 'db': 'test_xmodule', + 'collection': 'acceptance_modulestore', + 'fs_root': TEST_ROOT / "data", + 'render_template': 'mitxmako.shortcuts.render_to_string', +} + +MODULESTORE = { + 'default': { + 'ENGINE': 'xmodule.modulestore.mongo.MongoModuleStore', + 'OPTIONS': MODULESTORE_OPTIONS + }, + 'direct': { + 'ENGINE': 'xmodule.modulestore.mongo.MongoModuleStore', + 'OPTIONS': MODULESTORE_OPTIONS + }, + 'draft': { + 'ENGINE': 'xmodule.modulestore.mongo.DraftMongoModuleStore', + 'OPTIONS': MODULESTORE_OPTIONS + } +} # Set this up so that rake lms[acceptance] and running the # harvest command both use the same (test) database # which they can flush without messing up your dev db diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index c9b9596637..36e40663ed 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -13,7 +13,7 @@ modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'host': 'localhost', 'db': 'test_xmodule', - 'collection': 'test_modulestore', + 'collection': 'acceptance_modulestore', 'fs_root': TEST_ROOT / "data", 'render_template': 'mitxmako.shortcuts.render_to_string', }