Test Mongo database is now unique and destroyed in teardown

This commit is contained in:
JonahStanley
2013-06-25 11:33:46 -04:00
parent 3f9a72e6ce
commit 8a9125f121

View File

@@ -13,11 +13,12 @@ from xmodule.templates import update_templates
from .test_modulestore import check_path_to_location
from . import DATA_DIR
from uuid import uuid4
HOST = 'localhost'
PORT = 27017
DB = 'test'
DB = 'test_mongo_%s' % uuid4().hex
COLLECTION = 'modulestore'
FS_ROOT = DATA_DIR # TODO (vshnayder): will need a real fs_root for testing load_item
DEFAULT_CLASS = 'xmodule.raw_module.RawDescriptor'
@@ -39,7 +40,8 @@ class TestMongoModuleStore(object):
@classmethod
def teardownClass(cls):
pass
cls.connection = pymongo.connection.Connection(HOST, PORT)
cls.connection.drop_database(DB)
@staticmethod
def initdb():