Commit c56c88be by cahrens

create_xmodule was renamed to create_xblock, and mixed modulestore has create_xblock method.

Split modulestore throws duplicate errors if course locator is not unique.
parent 7a64e6f6
......@@ -8,6 +8,7 @@ import shutil
from StringIO import StringIO
import tarfile
from tempfile import mkdtemp
import factory
from django.conf import settings
from django.core.management import call_command
......@@ -53,15 +54,14 @@ class CommandsTestBase(TestCase):
"""Load test courses and return list of ids"""
store = modulestore()
# Add a course with a unicode name, if the modulestore
# supports adding modules.
if hasattr(store, 'create_xmodule'):
CourseFactory.create(
org=u'ëḋẌ',
course=u'śíḿṕĺé',
display_name=u'2012_Fáĺĺ',
modulestore=store
)
# Add a course with a unicode name.
unique_org = factory.Sequence(lambda n: u'ëḋẌ.%d' % n)
CourseFactory.create(
org=unique_org,
course=u'śíḿṕĺé',
display_name=u'2012_Fáĺĺ',
modulestore=store
)
courses = store.get_courses()
# NOTE: if xml store owns these, it won't import them into mongo
......
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