Commit Graph

3 Commits

Author SHA1 Message Date
Calen Pennington
b353ed2ea2 Better support specifying of modulestore configuration in test cases
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]
2015-02-04 09:09:14 -05:00
Awais
beeaec5a55 ECOM-335 Created new branch from master and put all changes from aamir-khan/ECOM-335-caching-api into this branch. 2015-01-12 20:58:48 +05:00
stephensanchez
1e7d567b58 Initial framework for the Course About API.
ECOM-248 Course Info API. Basic functionality implemented.

ECOM-248 adding factory for about descriptor and test cases for course info api

ECOM-248 adding test cases for couse info api.

ECOM-248 re-factoring code. updating test cases.

Tests for course_about data module

ECOM-248 Adding test cases for the exceptions.

ECOM-248 re-factoring code. fixing quality issues.

ECOM-248 fixing test cases and moved parse video method into utils.

added github username in authors

ECOM-248 removed merging issue of test_data

ECOM-248 removed unused files
2015-01-07 20:03:54 +05:00