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
christopher lee
b5e987ba61
MA-3091: Added mobile_available flag override admin setting
2017-01-23 15:04:40 -05:00
Rene Sorel
1b985a5ce0
fix quality issues and broken order of execution
2016-09-28 15:24:39 +02:00
Rene Sorel
66b32318ff
recommitting mobile api org filter
2016-09-28 14:34:31 +02:00
Jesse Zoldak
9c88404304
Revert "mobile api user course enrollments allow filter by org"
2016-09-27 15:33:09 -04:00
Rene Sorel
e503bb6fc2
correctly test count on org filtered courses
2016-09-22 09:44:12 +02:00
Rene Sorel
408bc223e5
requested changes for quality and performance
2016-09-20 11:55:10 +02:00
Rene Sorel
a91b5f380c
merge upstream/master
2016-08-25 13:53:43 +02:00
Sanford Student
fc943ff539
moving milestones check to access.py and upgrading milestones version
2016-08-04 14:47:15 -04:00
Calen Pennington
bc20a37c2b
Simplify how shards are selected in CI
2016-08-03 16:23:02 -04:00
Ned Batchelder
8571ceabeb
Fix many wrong-assert-type errors
2016-08-03 12:44:41 -04:00
wajeeha-khalid
986dcff626
MA-2536: get 'course_about' url in enrollment
2016-07-29 14:58:54 +05:00
Rene Sorel
14672ffe4f
unit test for mobile api org filter, query string args for api calls
2016-07-28 10:43:46 +02:00
Nimisha Asthagiri
a1a5a0fcb9
Enable Milestones in LMS Tests
2016-07-27 14:56:24 -04:00
Rene Sorel
87c3547d41
mobile api user course enrollments allow filter by org
2016-07-26 09:09:09 +02:00
Nimisha Asthagiri
1ada5c3487
Create Grades djangoapp
...
https://openedx.atlassian.net/browse/TNL-5008
2016-07-22 00:09:43 -04:00
Nimisha Asthagiri
c6954902e3
Create courseware/views folder
2016-05-03 09:02:45 -04:00
Nimisha Asthagiri
2f581448da
Refactor Courseware Index
...
MA-2189
2016-05-03 09:02:44 -04:00
wajeeha-khalid
86e954f642
version-based mobile app upgrade
2016-04-14 15:43:34 +05:00
Ben Patterson
c504029b39
Create a third shard for lms unit tests.
...
This will leverage the nose attrib plugin to allow us
to break tests apart on our build system to run
in parallel on separate nodes.
2016-03-17 12:01:42 -04:00
Nimisha Asthagiri
c088df0835
Remove unused Mobile latest_updates field
2016-02-18 12:12:05 -05:00
Nimisha Asthagiri
fa8ca11d8c
Remove unused Mobile Social Facebook endpoint
2016-02-18 12:12:04 -05:00
Douglas Hall
37a7fdc0f2
Added subsection gating feature
2016-01-28 14:05:20 -05:00
muzaffaryousaf
1616de5051
Bookmarks API.
...
TNL-2180
2015-12-17 22:07:30 +05:00
Nimisha Asthagiri
bb53c03e24
Optimize Course Catalog/About API with Course Overviews
2015-12-10 17:15:42 -05:00
chrisndodge
4334eb9bd1
Merge pull request #10885 from edx/release
...
Release
2015-12-08 15:21:48 -05:00
Nimisha Asthagiri
a5ddc3bf0a
Update Mobile API for PDF certificates and new Course Detail format.
...
MA-1767
2015-12-07 17:38:42 -05:00
Bill DeRusha
692e5d777a
Update copy for HCFA
...
Update Zendesk ticket to correctly add group.
Add logic to hide new audit certs
2015-12-07 14:18:55 -05:00
Peter Fogg
1ba1c213d5
Fix broken certificates-related tests.
2015-12-03 16:30:05 -05:00
Nimisha Asthagiri
8c4eefd53f
Merge pull request #10724 from edx/mobile/support-web-certs-MA-1667
...
MA-1667: Update Mobile API to support Web Certificates
2015-11-30 14:41:47 -05:00
Nimisha Asthagiri
0b90326470
MA-1667: Update Mobile API to support Web Certificates
2015-11-25 13:49:27 -05:00
Nimisha Asthagiri
330120bb7a
MA-1712: Update Mobile API to include course_about
2015-11-25 13:48:45 -05:00
Ned Batchelder
f5d0f3ff55
Remove useless pylint suppressions
2015-11-22 07:41:19 -05:00
Ned Batchelder
322ca34b20
Remove pylint pragmas from "class Meta"
...
Also remove useless docstrings where they were added to keep pylint
quiet.
2015-10-21 07:37:00 -04:00
wajeeha-khalid
90fe71dbfe
MA-1248 - CourseEnrollmentAPI: added discussion URL
2015-10-09 19:04:55 +05:00
Brian Beggs
619768f741
removed course_enrollment hint from UserDetail mobile api view. TNL-3452
2015-10-01 13:50:58 -04:00
Ned Batchelder
8ec2de9359
DRF 3.1 now uses request.data instead of request.DATA
2015-09-29 15:25:55 -04:00
Will Daly
8555630df7
Upgrade djangorestframework to v3.1
...
* Upgrade edx-submissions
* Upgrade edx-ora2
* Upgrade edx-val
* Upgrade edx-proctoring
* Update all edx-platform code that depends on DRF, including:
- auth_exchange
- cors_csrf
- embargo
- enrollment
- util
- commerce
- course_structure
- discussion_api
- mobile_api
- notifier_api
- teams
- credit
- profile_images
- user_api
- lib/api (OAuth2 and pagination)
2015-09-25 12:40:57 -04:00
Waheed Ahmed
aff849281d
Revert "Test library failed to export after import"
...
This reverts commit 4c1c4619f0 .
2015-08-12 02:06:09 +05:00
Syed Hassan Raza
4c1c4619f0
Test library failed to export after import
2015-08-05 12:47:27 -07:00
Ned Batchelder
f54fe787c6
Remove needless 'disable=no-member' pragmas
2015-08-03 17:47:44 -04:00
tlindaliu
3b483d14bc
MA-851: Add access response information into view_course_access
2015-07-31 09:30:40 -04:00
tlindaliu
5aeccd520b
MA-834: Add new fields to course enrollments endpoint in mobile API
...
Fields are start_type, start_display, and courseware_access.
2015-07-21 22:44:50 -04:00
srpearce
b12d3f6303
Merge pull request #8773 from edx/sylvia/docs/DOC-2102
...
Sylvia/docs/doc 2102
2015-07-17 15:42:59 -04:00
Sylvia Pearce
eea3b31105
Delete white spaces that are causing test failures
2015-07-17 16:12:53 +00:00
Sylvia Pearce
d2b6ac84d3
Reorganize and update API documentation
2015-07-15 14:31:02 -04:00
Sarina Canelake
ba8fd1c21d
Eliminate instances of unused-import Pylint violation
2015-07-13 17:33:25 -04:00
Kyle McCormick
d84c3bd7a9
MA-776 change UserCourseEnrollmentsList endpoint to use course_overviews
2015-06-22 18:33:12 -04:00
Carlos de la Guardia
d56303dd0f
Only enable the OverrideFieldData when there are active overrides on a course.
2015-06-17 15:26:10 -04:00
Nimisha Asthagiri
a7fabd5927
Move generic mobile API view decorators.
2015-05-27 14:35:27 -04:00