Commit Graph

28 Commits

Author SHA1 Message Date
M. Zulqarnain
42eacaf8de refactor: pyupgrade in common/util + xblock_django (#26724) 2021-03-09 16:49:51 +05:00
Aarif
a1406cddf2 replaced unittest assertions pytest assertions (#26528) 2021-02-18 18:09:45 +05:00
Jawayria
b1ecfc2252 Applied pylint-amnesty to util 2021-02-02 14:59:19 +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
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
usamasadiq
2cdc2e0d71 Removed unused commit_on_success decorator and its tests 2020-03-06 16:21:28 +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
Feanil Patel
46b730a9a0 reload is not a system built-in in python 3.
If we're in python 3 import reload from importlib.
2019-08-16 15:20:10 -04:00
Evans Dianga
391b91b99a Modernize common/djangoapps/util- INCR-203 (#20437) 2019-05-07 09:53:17 -04:00
Ned Batchelder
6a48195908 No need to keep self.tracker here 2018-09-17 16:48:14 -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
Kyle McCormick
fade4a10af Implement event for forum thread views
EDUCATOR-341
2017-07-11 12:42:49 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Calen Pennington
e93d112c04 Make UrlResetMixin.reset_urls a public method (so that it can be used inside test methods) 2016-06-06 13:27:38 -04:00
Calen Pennington
39ff841d1f Don't pass arguments to setUp (for UrlResetMixin)
The TestCase API doesn't accept arguments, so passing arguments for some
TestCase subclasses makes adding new inheritance/mixins tricky. Instead,
prefer configuration via class attributes for TestCases.
2016-05-04 11:34:51 -04:00
Nimisha Asthagiri
f3cb692472 Safe Session Cookies Middleware 2016-01-26 17:23:03 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
muhammad-ammar
29acc3acfc resolve merge conflicts
test fixes
2015-11-18 19:13:54 +05:00
muhammad-ammar
8d5f153201 Merge remote-tracking branch 'origin/release' into dj18-release-merge
Conflicts:
	common/djangoapps/util/testing.py
	lms/djangoapps/instructor/views/api.py
	lms/djangoapps/teams/tests/test_views.py
	openedx/core/djangoapps/programs/models.py
	openedx/core/djangoapps/user_api/accounts/tests/test_views.py
	requirements/edx/github.txt
2015-11-18 17:53:44 +05:00
wajeeha-khalid
4ea70aeb19 MA-862; accept application/merge-patch+json for comment/thread update 2015-11-13 12:52:21 +05:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
cahrens
938dcce061 Event change_initiated for password and email change requests. 2015-04-17 17:23:16 -04:00
Renzo Lucioni
8d02efb021 Clean up pep8 and pylint violations
Also fixes failing Python unit tests
2014-11-12 12:55:56 -05:00
Will Daly
d558a36127 Fix unit test failures due to duplicate url names
Reset the correct URLs module to fix test failures.

Fix third party auth to reconfigure the registry on test cleanup.
2014-10-20 09:10:11 -04:00
Nimisha Asthagiri
ea32529866 Fix all modulestore calls to pass in user ids. 2014-07-09 21:10:12 -04:00
Jay Zoldak
c98a77565f Make the UrlResetMixin load the urlconf after resetting it, and fix the comment client test that was leaving ENABLE_DISCUSSION_SERVICE at True 2013-06-27 11:05:09 -04:00
Calen Pennington
6c24694a7c Fix tests that vary urls.py
Create a mixin class that can be used for tests that customize urls.py
to force django to reload it, so that they don't break other tests.
2013-06-10 10:56:50 -04:00