Commit Graph

20 Commits

Author SHA1 Message Date
bmedx
11a4030767 LMS urls cleanup for Django 1.11
- Remove usage of django.urls.patterns
- Change urls tuples to lists
- Make all string view names callables
- This is the second of several urls updates for LMS; a work in progress
2017-11-06 16:06:00 -05:00
Clinton Blackburn
256849950d Added Studio API endpoint to support course creation
LEARNER-2468
2017-09-13 11:22:47 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
David Ormsbee
2051c90924 Test Speedup: Isolate Modulestore Signals
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]
2017-02-23 10:31:16 -05:00
Amir Qayyum Khan
f09445ed18 Added more tests 2016-10-18 16:20:57 +05:00
Amir Qayyum Khan
164d324449 Refactor tests 2016-10-18 16:20:57 +05:00
Amir Qayyum Khan
25d8085b79 Fixed authentication classes to support Django OAUTH Toolkit 2016-10-18 16:20:57 +05:00
Sanford Student
79eaa4e2e9 update all references to instructor module 2016-10-12 10:04:32 -04:00
Brandon DeRosier
8c3224b4f0 Finish implementing CCX coach as staff 2016-10-07 11:53:32 -04:00
Jesse Shapiro
8533fd9734 Adding change to staff role for new users and draft migration 2016-10-07 11:52:59 -04:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Amir Qayyum Khan
34034aa6f5 Made ccx id unicode in app 2016-07-29 19:37:46 +05:00
Amir Qayyum Khan
d5fcb609e7 Fixed progress page update on save ccx 2016-07-29 18:11:42 +05:00
Calen Pennington
e6c235a4b8 Only assert on item-equality when checking ccx course modules 2016-06-06 13:09:52 -04:00
Calen Pennington
084f139113 Remove a redundant setUpClass method that only called super 2016-05-19 10:20:20 -04:00
Clinton Blackburn
6941fcd766 Updated access token view to return a JWT as an access token
The JWT includes the user email and username, along with details pulled from the original access token (e.g. scope, expiration).

ECOM-4221
2016-04-26 09:32:49 -04:00
Amir Qayyum Khan
795ead82b5 Added master course staff and admins to ccx and fixed same issues related to ccx 2016-03-26 03:18:39 +05:00
Giovanni Di Milia
0c637cdca9 Added extra field to CCX model for Course Models
REST APIs modified
2016-02-25 10:27:39 -05:00
Giovanni Di Milia
7683eadcaf Modified permission classes for CCX REST APIs
Modified how the per object permissions are enforced in the CCX REST APIs
2016-02-24 08:40:07 -05:00
Giovanni Di Milia
e63194c1cd Added CCX REST APIs
CCX REST APIs
OAUTH2 authorization for CCX APIs
- oauth2 authorization required for ccx list.
- Course-instructor permission for ccx api endpoint
- Protection for detail view too.

Tests for CCX REST APIs and OAUTH2 authorization
2016-01-27 11:04:28 -05:00