The existing pattern of using `override_settings(MODULESTORE=...)` prevented
us from having more than one layer of subclassing in modulestore tests.
In a structure like:
@override_settings(MODULESTORE=store_a)
class BaseTestCase(ModuleStoreTestCase):
def setUp(self):
# use store
@override_settings(MODULESTORE=store_b)
class ChildTestCase(BaseTestCase):
def setUp(self):
# use store
In this case, the store actions performed in `BaseTestCase` on behalf of
`ChildTestCase` would still use `store_a`, even though the `ChildTestCase`
had specified to use `store_b`. This is because the `override_settings`
decorator would be the innermost wrapper around the `BaseTestCase.setUp` method,
no matter what `ChildTestCase` does.
To remedy this, we move the call to `override_settings` into the
`ModuleStoreTestCase.setUp` method, and use a cleanup to remove the override.
Subclasses can just defined the `MODULESTORE` class attribute to specify which
modulestore to use _for the entire `setUp` chain_.
[PLAT-419]
This feature allows upload of video assets to S3. This requires that the
VIDEO_UPLOAD_PIPELINE setting be properly configured and that each
course be configured with a token issued by the media team for their
processing purposes (e.g. linking the video with a YouTube channel).
Co-authored-by: Greg Price <gprice@edx.org>
Move modulestore config for tests to an importable location
Disable pylnt warning for lms imports in common tests
Refactor all testcases that loaded all xml courses
TE-610
TE-489
add test for videomodule
Import drafts handles modules w/o xml_attributes
and ones using the old parent_sequential_url pointer
Handle drafts for modules which don't define nor extract xml_attributes
Support and in get_items qualifiers
Unit test for value query
Added update_item, create_item, create_child to split_draft.py
Cleaned up TODOs in test_mixed_modulestore.py
Unit test for auto-publish
LMS-11017
Added tests to test_mixed_modulestore.py for has_changes and added black_list to _auto_publish
Moved DIRECT_ONLY_CATEGORIES to draft_and_publish.py
Deleted test_split_draft_modulestore.py
Added _auto_publish to create course
Publish cleanups for update_version, source_version
Changed has_changes to use source_version
Removing mixed test that no longer makes sense in auto_publish world
Addressed TODOs in test_branch_setting
This commit adds all of cms.
These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).
For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.
Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>
[LMS-2370]
This is the changes for STUD-1244, which introduces the ability for Studio to display
arbitrarily nested xblocks. In this change, a new container page is introduced which can
display nested xblocks. In particular, the xblock type of 'vertical' is special cased
to be shown inline as a collapsible section. The unit page is mostly unchanged, except
that container xblock's are shown as a link to their container page, rather than being
shown inline.
Updated the pagination tests to no longer use the toy course, but to instead explicitly upload the assets it needs.
Added a new AssetsTestCase base class to own shared helper methods.