Commit Graph

33 Commits

Author SHA1 Message Date
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
Christie Rice
f844681913 Revert "BOM-2368: pyupgrade in LMS Directory (#26649)"
This reverts commit fc06846cb0.
2021-02-23 15:29:49 -05:00
M. Zulqarnain
fc06846cb0 BOM-2368: pyupgrade in LMS Directory (#26649)
* pyupgrade in lms dir

* replace wildcard

* pep8 fix

* fix quality
2021-02-23 12:36:00 +05:00
Aarif
7d5f9b2016 replaced unittest assertions pytest assertions (#26553) 2021-02-19 16:03:53 +05:00
M. Zulqarnain
d9b9f21e22 pylint amnesty in LMS root (#26276) 2021-02-02 12:52:24 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -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
Ned Batchelder
d585a8f71d URLs and settings for OpenAPI generation
API docs are now always available, no more toggle to enable them.
2019-09-17 16:54:27 -04:00
Diana Huang
bf7dad15e4 Remove microsite djangoapp except migrations and configuration. 2019-08-16 09:42:57 -04:00
Ayub khan
3b074323b8 BOM-70
-Remove Depricated View and tests
2019-08-08 21:32:42 +05:00
Ayub
26a1445c93 Revert "BOM-70" 2019-08-08 17:39:45 +05:00
Ayub khan
c965e13c73 BOM-70
-Removed Submit-feedback View
-Removed related tests
-Removed help_modal.html
-Removed help_modal.html test
-Removed zendesk from requirements
-Updated requirements
2019-08-05 13:38:46 +05:00
Amit
7dfb73c7a6 INCR-483: Make compatible with Python 3.x without breaking Python 2.7 support (#20795)
* reword INCR-483: Make compatible with Python 3.x without breaking Python 2.7 support

pick INCR-483: Re-run isort for lms/envs/test.py

INCR-483: change import order

INCR-483: PyLint fixes

* INCR-483: Fixes useless suppression

* INCR-483: Remove unused get_swagger_view
2019-07-02 12:54:34 -04:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Alex Dusenbery
99705e54a6 Remove GenericAPIView subclass from grades API views; add a test that /api-docs/ works. 2018-10-31 16:10:31 -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
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Jeremy Bowman
d3d6272d8f PLAT-1873 to_deprecated_string() cleanup part 1 2018-01-08 13:51:42 -05:00
John Eskew
a36eb51a64 Move microsite config from startup.py to settings and AppConfig.ready. 2017-11-01 14:04:31 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Robert Raposa
eaab2cf444 Add course overrides of waffle flags. 2017-06-01 15:12:50 -04:00
Andy Armstrong
2167584e5e Unify the home and course tabs
LEARNER-609
2017-05-01 17:22:28 -04:00
Giovanni Di Milia
ddc4683335 Fixed pylint violation for files in lms/ 2015-10-14 14:31:22 -04:00
Sarina Canelake
ba8fd1c21d Eliminate instances of unused-import Pylint violation 2015-07-13 17:33:25 -04:00
Adam Palay
d9a21bdf4d use email context for keyword substitution, cutting down on db queries (TNL-1591) 2015-04-08 11:22:26 -04: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
njdup
32bbb0e71a Implements keyword sub feature for bulk emails
This commit pulls in changes from #4487 that implements keyword
substitution for bulk emails. With these changes, an instructor can
include keywords in their bulk emails which will be automatically substituted
with the corresponding value for the recepient of the email. Keywords are
of the form %%keyword%%, and the keywords implemented in this commit include:

%%USER_ID%% => anonymous_user_id
%%USER_FULLNAME%% => user profile name
%%COURSE_DISPLAY_NAME%% => display name of the course
%%COURSE_END_DATE%% => end date of the course

Client-side validations have also been implemented to ensure that only emails
with well-formed keywords can be sent.
The architecture is designed such that adding in new keywords in the future
would be relatively straight-forward.
2014-12-11 15:03:29 -08:00
Sarina Canelake
725e4908e3 Remove more pep8 violations 2014-11-04 07:37:41 -05:00
Adam Palay
5fa38cb59e add simple help-modal-test 2014-09-22 09:34:32 -04:00
Alan Boudreault
57025cd5e6 Add missing mimetypes for xblock resources 2014-05-29 11:14:00 -04:00
Usman Khalid
12c2e1bfee Test TemplateLookup dirs are not cleared during lms startup.
LMS-2498
2014-04-03 20:23:44 +05:00