Files
edx-platform/lms/djangoapps/courseware/tests/test_draft_modulestore.py
Michael Terry cb1bb7fa64 test: switch default test store to the split store
It's long past time that the default test modulestore was Split,
instead of Old Mongo. This commit switches the default store and
fixes some tests that now fail:
- Tests that didn't expect MFE to be enabled (because we don't
  enable MFE for Old Mongo) - opt out of MFE for those
- Tests that hardcoded old key string formats
- Lots of other random little differences

In many places, I didn't spend much time trying to figure out how to
properly fix the test, and instead just set the modulestore to Old
Mongo.

For those tests that I didn't spend time investigating, I've set
the modulestore to TEST_DATA_MONGO_AMNESTY_MODULESTORE - search for
that string to find further work.
2022-02-04 14:32:50 -05:00

24 lines
732 B
Python

"""
Test the draft modulestore
"""
from opaque_keys.edx.keys import CourseKey
from xmodule.modulestore.tests.django_utils import TEST_DATA_MONGO_MODULESTORE, ModuleStoreTestCase
class TestDraftModuleStore(ModuleStoreTestCase):
"""
Test the draft modulestore
"""
MODULESTORE = TEST_DATA_MONGO_MODULESTORE
def test_get_items_with_course_items(self):
# fix was to allow get_items() to take the course_id parameter
self.store.get_items(CourseKey.from_string('a/b/c'), qualifiers={'category': 'vertical'})
# test success is just getting through the above statement.
# The bug was that 'course_id' argument was
# not allowed to be passed in (i.e. was throwing exception)