Commit Graph

54 Commits

Author SHA1 Message Date
Usama Sadiq
7e275ec3ca refactor: ran pyupgrade on lms/djangoapps (#26523)
ran pyupgrade on course_Wiki, coursewarehistoryextended
2021-03-09 12:49:44 +05:00
Aarif
d2a147bb47 replaced unittest assertions pytest assertions (#26542) 2021-02-18 19:14:41 +05:00
Jawayria
0c22d77bf8 Applied pylint-amnesty to course_wiki 2021-02-01 19:44:11 +05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Stu Young
dcb92bdfad INCR-281 Run python-modernize on lms/djangoapps/course_wiki/tests (#20576)
* run python modernize

* run isort
2019-05-21 11:26:32 -04:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -04:00
Michael Youngstrom
26b4e30833 Remove django 1.8 shim 2018-06-06 10:34:56 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Uman Shahzad
5746729895 Revert "Revert "Show Enterprise display name if we should hide sensitive user…" 2018-04-23 18:27:36 +05:00
George Babey
a155aad01c Revert "Show Enterprise display name if we should hide sensitive username."
This reverts commit d58bd06928.

This commit caused performance issues due to increased API load from checking the
enterprise association on each page load
2018-04-17 09:07:17 -04:00
Uman Shahzad
d58bd06928 Show Enterprise display name if we should hide sensitive username. 2018-04-12 19:10:30 +05:00
Jeremy Bowman
669aa13ad6 PLAT-1873 to_deprecated_string() cleanup part 2 2018-01-08 17:26:55 -05:00
Jeremy Bowman
1aebe11afc PLAT-1859 Fix LMS shard 1 tests under Django 1.9 2017-12-27 14:38:55 -05:00
Jose Antonio Gonzalez
623c945bb2 change default article name to be course name instead of slug 2017-12-21 10:14:32 -05:00
bmedx
5fbbf4979a Tag LMS Unit 1 tests that fail in Django 1.11 2017-11-22 15:46:45 -05:00
Uman Shahzad
2601b26af6 Update mocks/docs/code to reflect Enterprise API updates. 2017-10-11 02:05:04 +05:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Andy Armstrong
0325425c8c Add data sharing consent redirect for more course tabs
LEARNER-394
2017-03-31 19:12:13 -04:00
Jillian Vogel
25383a603e Ensure Enterprise-integrated courses require user consent before granting access to Wiki and Discussion forum.
* User-facing links are gated; internal services are not.
* Adds view decorator data_sharing_consent_required
* Renames `get_course_specific_consent_url` to `get_enterprise_consent_url`,
  which now checks `consent_needed_for_course` before returning a consent URL.
2017-03-10 09:29:24 +10:30
Matjaz Gregoric
c5f4ba0fa7 Upgrade django-wiki to 0.0.9.
The new version fixes a problem where wiki fails with a 500 error when
combined org/course name/course run fields are longer than 50
characters.
2016-08-24 08:43:38 +02: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
Ahsan Ulhaq
96d030b6d9 Reverse and Rename Courseware and Course Info Tabs
ECOM-2678
2016-02-03 12:20:53 -05:00
Nimisha Asthagiri
f3cb692472 Safe Session Cookies Middleware 2016-01-26 17:23:03 -05:00
zubair-arbi
e369939b4b change redirect url from '/accounts/login' to '/login'
ECOM-1734
2015-07-02 18:44:10 +05:00
Christine Lytwynec
ddb1ae667e Split lms unittests into multiple shards 2015-05-07 09:17:26 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
stv
f03b943b95 Fix Pylint: W0612(unused-variable) 2015-03-13 20:20:05 -07:00
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
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -05:00
Jesse Zoldak
bf3b87bc64 Clean up all modulestore testcases
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
2014-12-02 07:09:36 -05:00
muhammad-ammar
fcaa783e43 Unit Test Improvements
TE-489
2014-10-31 11:55:13 +00:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04:00
Calen Pennington
cd746bf8e5 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds the non-courseware lms/djangoapps and lms/lib.

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-08 12:09:23 -04:00
Dave St.Germain
660244201f Refactored course_nav middleware to isolate the django-wiki hack,
remove unnecessary code, and clarify what it's doing.
2014-04-08 15:24:48 -04:00
Adam
2e174f2aa7 Merge pull request #3070 from edx/adam/middleware
wiki middleware fix (LMS-2461)
2014-03-26 16:36:17 -04:00
Chris Dodge
10465e3eb0 add some authorization checks to the Wiki 2014-02-28 13:36:18 -05:00
Ned Batchelder
1bd213beba Remove unused imports. 2014-02-10 14:07:50 -05:00
Will Daly
48c6daacb8 Removed unnecessary settings wrangling from ModuleStoreTestCase.
Modified navigation tests to use MixedModulestore
Updated factories to find editable modulestore

Updated test_submitting_problems

Updated test_tabs.py

Updated test_view_authentication

Updated test_views

Updated courseware/tests/tests.py

Updated test_masquerade

Updated test_module_render

Pylint fixes

Updated video and word cloud tests

Updated course wiki tests

Updated license and open_ended tests.
One open_ended test still failing due to Mako initialization issues

Updated staticbook

Updated django_comment_client tests

Updated instructor tests

Updated instructor task tests

Updated external_auth tests

Updated course_groups
2013-08-21 09:36:45 -04:00
Calen Pennington
0d3c44996a LMS i18n from Tsinghua 2013-07-31 19:39:15 -04:00
JonahStanley
7fb5f505d6 Refactored out full from the lms tests 2013-07-11 10:12:06 -04:00
Brian Wilson
99778b1b5b add fixes for 500 bugs (lighthouse 287 and 293) by requiring login for accessing licenses and inline discussions. Add unit tests for licenses, and rearrange tests based off of (the former) PageLoad. Also cleanups for pylint and pep8. 2013-03-27 17:59:56 -04:00
Ned Batchelder
aa2d0ecaf2 We no longer need override_settings, Django has a better one. 2013-02-11 17:06:35 -05:00