- 12 Jun, 2017 1 commit
-
-
Andy Armstrong committed
-
- 23 Feb, 2017 1 commit
-
-
There are a number of Django Signals that are on the modulestore's SignalHandler class, such as SignalHandler.course_published. These signals can trigger very expensive processes to occur, such as course overview or block structures generation. Most of the time, the test author doesn't care about these side-effects. This commit does a few things: * Converts the signals on SignalHandler to be instances of a new SwitchedSignal class, that allows signal sending to be disabled. * Creates a SignalIsolationMixin helper similar in spirit to the CacheIsolationMixin, and adds it to the ModuleStoreIsolationMixin (and thus to ModuleStoreTestCase and SharedModuleStoreTestCase). * Converts our various tests to use this new mechanism. In some cases, this means adjusting query counts downwards because they no longer have to account for publishing listener actions. Modulestore generated signals are now muted by default during test runs. Calls to send() them will result in no-ops. You can choose to enable specific signals for a given subclass of ModuleStoreTestCase or SharedModuleStoreTestCase by specifying an ENABLED_SIGNALS class attribute, like the following example: from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase class MyPublishTestCase(ModuleStoreTestCase): ENABLED_SIGNALS = ['course_published', 'pre_publish'] You should take great care when disabling signals outside of a ModuleStoreTestCase or SharedModuleStoreTestCase, since they can leak out into other tests. Be sure to always clean up, and never disable signals outside of testing. Because signals are essentially process globals, it can have a lot of unpleasant side-effects if we start mucking around with them during live requests. Overall, this change has cut the total test execution time for edx-platform by a bit over a third, though we still spend a lot in pre-test setup during our test builds. [PERF-413]
David Ormsbee committed
-
- 26 Jan, 2017 1 commit
-
-
Dennis Jen committed
-
- 13 Oct, 2016 1 commit
-
-
Andy Armstrong committed
-
- 30 Mar, 2016 1 commit
-
-
MA-1998 Install and configure django_oauth_toolkit to coexist with existing oauth libraries.
J. Cliff Dyer committed
-
- 17 Sep, 2015 1 commit
-
-
- Course overviews will cache courses upon publish. - Added management command to warm up cache. - OAuth2 handler returns courses via course overviews.
Dennis Jen committed
-
- 11 Aug, 2015 1 commit
-
-
This reverts commit f0d1772d.
Dennis Jen committed
-
- 03 Aug, 2015 1 commit
-
-
Dennis Jen committed
-
- 17 Mar, 2015 1 commit
-
-
TNL-1493 See https://openedx.atlassian.net/wiki/display/TNL/User+API for details
Andy Armstrong committed
-
- 04 Feb, 2015 1 commit
-
-
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]
Calen Pennington committed
-
- 05 Dec, 2014 1 commit
-
-
TNL-649
Andy Armstrong committed
-
- 02 Dec, 2014 2 commits
-
-
This scope offers a simple claim, administrator, that is true iff the user is a superuser.
Clinton Blackburn committed -
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
Jesse Zoldak committed
-
- 06 Nov, 2014 1 commit
-
-
Carlos Andrés Rocha committed
-
- 31 Oct, 2014 1 commit
-
-
TE-489
muhammad-ammar committed
-
- 03 Oct, 2014 1 commit
-
-
Previously, only courses respective to the branded instance were returned. AN-3610
Carlos Andrés Rocha committed
-
- 22 Sep, 2014 2 commits
-
-
If the user has not selected a default locale, then return the default one.
Carlos Andrés Rocha committed -
Carlos Andrés Rocha committed
-
- 17 Sep, 2014 1 commit
-
-
Carlos Andrés Rocha committed
-