Commit b7674679 by JonahStanley

Tests now use their own contentstore database

test.py was changed such that the database being used is test_xcontent
course_helpers.clear_courses now calls contentstore().fs_files.drop() such that all content is removed and the databse is started afresh in the same manner as the modulestore
parent 271de4fb
......@@ -70,7 +70,7 @@ CONTENTSTORE = {
'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore',
'OPTIONS': {
'host': 'localhost',
'db': 'xcontent',
'db': 'test_xcontent',
}
}
......
......@@ -11,6 +11,7 @@ from django.contrib.auth.middleware import AuthenticationMiddleware
from django.contrib.sessions.middleware import SessionMiddleware
from student.models import CourseEnrollment
from xmodule.modulestore.django import _MODULESTORES, modulestore
from xmodule.contentstore.django import contentstore
from xmodule.templates import update_templates
from bs4 import BeautifulSoup
import os.path
......@@ -133,3 +134,4 @@ def clear_courses():
_MODULESTORES = {}
modulestore().collection.drop()
update_templates(modulestore('direct'))
contentstore().fs_files.drop()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment