Commit Graph

30 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
Aarif
c21ac0c3df replaced unittest assertions pytest assertions (#26573) 2021-02-22 20:04:27 +05:00
usamasadiq
297dfd9718 Applied pylint amnesty 2021-02-04 19:14:40 +05:00
Jawayria
9909b933a7 Applied pylint-amnesty to openedx/core/{djangolib, lib, tests, *.py 2021-02-02 21:13: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
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
Taranjeet Singh
00653433a5 Adds optional "unsubscribe" link and api support to let users opt out of email updates.
Scheduled emails show "unsubscribe" link if waffle switch
`schedules.course_update_show_unsubscribe` is enabled, and
settings.ACE_ENABLED_POLICIES respects `bulk_email_optout`.

API endpoint allows GET/POST requests, which:

* GET asks for confirmation of opt-out
* POST accepts "unsubscribe" or "cancel", where "unsubscribe" creates the
  Optout entry, and "cancel" does nothing.

Fixes flaky tests:

* The resolvers handle users in "bins", which are groups that depend on the user ID.
* The test user ID varies depending on the test order.
* This change ensures that the bin requested matches the user for the test.
2019-12-09 22:49:57 +10:30
aliciaerwin
140fb1394e INCR-166 Run python-modernize on openedx/core/djangolib (#20473)
* INCR-166 Run python-modernize on openedx/core/djangolib

* INCR-166 disabled harmless errors and added docstring
2019-05-09 13:59:48 -04:00
Matthew Piatetsky
444799fb0e fix unicode strings in openedx/ part 2 2019-02-15 10:15:51 -05:00
Calen Pennington
9ff9c33f59 Add a test that shows how bad course api query counts are 2019-02-06 10:11:15 -05:00
Calen Pennington
805f32a357 Revert "Allow courses api to return data incrementally" 2019-01-25 12:56:57 -05:00
Calen Pennington
ee75db2703 Add a test that shows how bad course api query counts are 2019-01-24 22:54:01 -05:00
Robert Raposa
ba4cc62ff8 Retire deprecated RequestCache (Take 2)
ARCH-223
2018-09-08 15:09:28 -04:00
Michael Youngstrom
bc1d883e1a Dont let DarkLangConfig cache interfere with other tests 2018-09-06 10:33:54 -04:00
Nimisha Asthagiri
4ca165f690 Revert "ARCH-223: Retire deprecated RequestCache." 2018-08-30 16:33:03 -04:00
Robert Raposa
3df339a56a Retire deprecated RequestCache.
ARCH-223
2018-08-30 08:55:19 -04:00
Robert Raposa
99c9eb7343 Migrate to edx-django-utils monitoring.
ARCH-220
2018-08-17 15:39:04 -04:00
Qubad786
64555c60c0 Move request_cache to openedx.core.djangoapps 2018-01-26 15:09:25 +05:00
Jeremy Bowman
0f4e4e1c31 Remove unused nose settings and plugin 2017-11-07 16:34:59 -05:00
John Eskew
02f26f55ce Remove unused imports. Push model imports down into relevant methods.
Mock out the static_replace modules in the proper location.
2017-10-05 11:12:52 -04:00
Robert Raposa
2e80c1e66b Refactor, enhance, and adjust unified_course_view flag.
This includes several general enhancement in addition
to the fixes for unified_course_view:
1. Add support for default when no waffle flag defined.
2. Add support for table_blacklist to assertNumQueries.
3. Rename flag to 'course_experience.course_outline_page'.
4. Change flag default to True when it is not defined.
2017-06-29 11:04:35 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Renzo Lucioni
2955a6e639 Remove credential listing from program list view
The new design for the program detail page introduced a sidebar which includes a program-specific listing of credentials. This is an improvement over the old list of credentials found on the program list page and is meant to replace it. The new detail page is stable, so the credential listing on the program list page can be removed.

LEARNER-492
2017-05-22 16:07:37 -04:00
Nimisha Asthagiri
6f9b810f9a Storage-backed versioned Block Structures: Configuration 2017-02-27 00:39:22 -05:00
Renzo Lucioni
21e92a41d1 Add testing utility for toggling Waffle Switches 2017-01-23 11:29:38 -05:00
J. Cliff Dyer
f33832a691 scoutrule: dedupe skip_unless_lms 2017-01-18 09:43:46 -05:00
J. Cliff Dyer
9366c43a83 Fix issues with RequestFactory used as Request.
* Centralize creation of quick request objects.
* Isolate caches to individual tests to prevent test ordering
  dependencies.

TNL-5811
2016-11-07 10:51:04 -05:00
Calen Pennington
09dc884c38 Isolate databases between test processes 2016-05-18 14:10:28 -04:00
Calen Pennington
b3880714b9 Assert that caches are being overridden correctly (and being reset in the right order) 2016-05-04 14:51:31 -04:00
Calen Pennington
853bfe7a36 Add a TestCase mixin for enabling caches in tests
By default, disable all caching in tests, to preserve test independence.
In order to enable caching, inherit from CacheSetupMixin, and specify
which cache configuration is needed.

[EV-32]
2016-05-04 14:51:30 -04:00