Commit Graph

75 Commits

Author SHA1 Message Date
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -05:00
Jonathan Piacenti
eabd6c8d27 Quality check and test fixes. 2015-01-12 13:41:03 +03:00
Don Mitchell
98f962274c Update opaque_keys to new release 2014-10-21 09:30:33 -04:00
zubair-arbi
40f270c945 add couse key verification decorator in common for use in both studio and lms
PLAT-88
2014-09-29 13:26:43 +05:00
Nimisha Asthagiri
a9213509c3 Enable Mixed Modulestore STUD-1540
Refactor get_parent_locations STUD-1663
2014-06-26 18:00:11 -04:00
Calen Pennington
0d88379eeb Make course ids and usage ids opaque to LMS and Studio [partial commit]
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]
2014-05-07 12:56:43 -04:00
David Baumgold
a143309a22 Add unit tests to handle duplicate user registration attempts 2014-02-10 16:05:34 -05:00
David Baumgold
751669cbe7 /create_account: use proper HTTP status codes
Use status code 400 when there is a validation error in creating an account.
2014-01-30 15:23:57 -05:00
Chris Dodge
8c60f2935a Add optional feature to lock out accounts after N failed login attempts. Lockouts will last M seconds.
add DB migration and fix earlier mistakes in student migration history

add tests and fix bugs that came out of those unit tests

remove unused import

pep8/pylint

address some PR feedback

fix tests

fix broken test

try to mock time

use freeze-gun to overload the system time to simulate the future
2014-01-29 16:54:28 -05:00
Chris Dodge
fcefada2d7 add middleware to be able to expire inactive sessions after N seconds
configure middleware

add test for session inactive timeouts

add Studio inactive session timeout test

change login method used

add create_test_account to test

make sure the expected redirect URL is right

fix indenting problem

fix doc string since we moved from minutes to seconds

use utility methods rather than calling another test to set up and activate an account

clean up code violations

respond to PR feedback

use optional params to make code cleaner

pylint fix on test files
2014-01-24 10:36:21 -05:00
Don Mitchell
f41816637e RESTful refactoring of /course access continued
Move index access into the url
Move course creation into the url
Add helper methods for testing to serialize json data and set accept header.
2013-10-30 13:28:22 -04:00
Will Daly
e50a2414b2 Studio ModuleStoreTestCase subclasses now use randomized Mongo
collection names
2013-08-27 12:57:14 -04:00
Diana Huang
c867be7961 Limit the rate of logins. 2013-08-02 11:23:59 -04:00
David Baumgold
248793c127 Fix some pylint issues 2013-07-31 15:42:11 -04:00
David Baumgold
437e658f98 pylint fixes 2013-07-09 19:16:44 -04:00
Don Mitchell
085a590bdd timezone conversion: more unit tests
and code reorganization
2013-06-17 14:48:18 -04:00
Chris Dodge
91d3f4ddff add simple content check for the activation page when the user is not logged in 2013-06-02 00:43:17 -04:00
Calen Pennington
6644b78819 Fix gradebook when using grade cutoffs other than A/B/C 2013-04-16 11:38:58 -04:00
Chris Dodge
b4fe23f3a2 more cleanups in CMS project 2013-04-13 21:13:34 -04:00
Calen Pennington
6b64b4214f Make relative imports explicitly relative 2013-03-15 11:23:22 -04:00
Calen Pennington
fd3ba7db2a Don't make cms.djangoapps a python module 2013-03-15 10:50:46 -04:00
Ned Batchelder
c3b571bf9b Make sure temp directories are properly cleaned up so running tests doesn't leave them behind. 2013-02-21 11:38:45 -05:00
Christina Roberts
0b91c1c346 Merge pull request #1487 from MITx/fix/cdodge/cleanup-deleted-templates
clean up templates that were removed from disk - we need to remove from ...
2013-02-13 06:29:35 -08:00
Chris Dodge
fbe3d29f19 added tests 2013-02-13 09:25:09 -05:00
Ned Batchelder
aa2d0ecaf2 We no longer need override_settings, Django has a better one. 2013-02-11 17:06:35 -05:00
Calen Pennington
cfae1cdf62 Pep8 autofixes 2013-02-06 11:13:50 -05:00
Jay Zoldak
abf4ad36f4 Move modulestore unique naming in tests from the settings.py file into the ModuleStoreTestCase class. 2013-02-06 10:42:21 -05:00
Jay Zoldak
fde6d1ba1c Refactor tests for cms contentstore. 2013-02-06 10:42:21 -05:00
Jay Zoldak
3324615270 Reorganize test cases 2013-02-06 10:41:08 -05:00
Jay Zoldak
5a6b039208 Reorganize the CmsTestCase subclass 2013-02-06 10:36:28 -05:00
Jay Zoldak
2c5a7ccdf7 Rearrange factories and clean up imports 2013-02-06 10:36:28 -05:00
Chris Dodge
3fa1fe0cd6 change from throwing a Http404 exception, which I believe will try to render a static 404.html template - and ironically triggers a 500 server error. Just create a HttpResponse and set the status_code to 404. 2013-02-05 16:26:07 -05:00
Chris Dodge
ab9d30cbc6 Merge branch 'master' of github.com:MITx/mitx into fix/cdodge/export-static-tabs 2013-01-31 10:51:24 -05:00
Chris Dodge
fc57e7afdb add testing for course info export. Plus DRY things out a bit 2013-01-31 10:51:20 -05:00
Christina Roberts
54c1fe9c67 Merge pull request #1384 from MITx/fix/cdodge/export-static-tabs
adding exporting of tabs and custom_tags. Also added unit tests
2013-01-30 10:52:31 -08:00
Chris Dodge
c676046341 adding exporting of tabs and custom_tags. Also added unit tests 2013-01-30 13:25:17 -05:00
Chris Dodge
7f32aae47d rename method to something that actually better reflects what it is doing. Also rename a variable to help with readability 2013-01-30 11:50:11 -05:00
Chris Dodge
74fcf96611 don't hard code the ordering of the tabs in the test. Take the current ordering defintion (in the test data) and reverse it 2013-01-30 09:43:57 -05:00
Chris Dodge
855c8bb7e7 add unit test for tab reordering 2013-01-29 13:44:42 -05:00
Chris Dodge
9c3e727889 add unit test to assert that the flag is not set on course metadata 2013-01-23 15:14:36 -05:00
Chris Dodge
b5776a775e add another assert test 2013-01-14 12:17:51 -05:00
Chris Dodge
edb913f6ac add tests for about content overrides 2013-01-14 12:12:40 -05:00
Don Mitchell
fff9afdeb8 Minor cleanups 2013-01-09 11:38:01 -05:00
Don Mitchell
2d8ddb0dcb Ever slightly more rigorous test. actually look for the markdown field
in the model as well as the ancillary info
2013-01-09 10:47:03 -05:00
Don Mitchell
ae4e7815a9 CapaDescriptor new unit tests 2013-01-08 13:16:38 -05:00
Chris Dodge
b5ccb4b8fc trigger another build 2013-01-02 15:01:21 -05:00
Chris Dodge
d008cb9f3c another comment commit just to trigger a new build 2013-01-02 14:25:35 -05:00
Chris Dodge
cf3df23094 basically force another build by adding a comment 2012-12-28 16:48:02 -05:00
Chris Dodge
f343052711 add a comment. Namely we just want to trigger another build. 2012-12-28 14:26:52 -05:00
Chris Dodge
6d20292ae8 add unit test to make sure rewriting is occuring when querying the handouts 2012-12-28 12:21:14 -05:00