Commit Graph

120 Commits

Author SHA1 Message Date
Usama Sadiq
2adf8b759e refactor: ran pyupgrade on lms/djangoapps/commerce (#26734) 2021-03-09 14:21:08 +05:00
Aarif
a332aac1f6 replaced unittest assertions pytest assertions (#26541) 2021-02-19 12:27:11 +05:00
Jawayria
4b4fc89693 Applied pylint-amnesty to commerce 2021-02-01 18:56:15 +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
Jeremy Bowman
d19368525b DEPR-43 Remove most of the shoppingcart app (#24692)
Removed most of the deprecated shoppingcart app, leaving just enough to allow us to cleanly remove the related database tables later. Also removed the relevant Django settings that weren't in use elsewhere.
2020-10-14 14:24:52 -04:00
Nimisha Asthagiri
5b3f5ee85a commerce app: remove code related to shoppingcart (#23974)
Part of DEPR-43 - https://openedx.atlassian.net/browse/DEPR-43

Co-authored-by: Jeremy Bowman <jbowman@edx.org>
2020-05-28 09:46:12 -04:00
mariajgrimaldi
6eead791a1 Fix DeprecationWarning: Please use assertNotRegex instead (#23907)
I wanted to make a byte-sized contribution but there were no Jira tickets so we decided, thanks to a conversation with @jmbowman through the Open Edx Community #incr (Slack) channel, to collaborate in the elimination of warnings listed in the Warnings Report at https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/

This PR contributes to the elimination of deprecation warnings, specifically the one mentioned above and reported in the Warnings Report.

Changed assertNotRegexpMatches to assertNotRegex in the following files:

    cms/djangoapps/contentstore/views/tests/test_preview.py

    cms/djangoapps/contentstore/views/tests/test_item.py

    lms/djangoapps/commerce/tests/test_views.py

    lms/djangoapps/dashboard/tests/test_sysadmin.py

This warning occurs due to deprecation in python 3.5: https://docs.python.org/3.5/library/unittest.html#unittest.TestCase.assertNotRegex
2020-05-08 11:53:02 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Awais Qureshi
30a2ae8aec BOM-1438
Fix course_id string.
2020-04-01 14:42:35 +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
Feanil Patel
844acea50e Fix linting errors. 2019-09-19 17:05:02 -04:00
Feanil Patel
802929fde4 BOM-622 Type errors in content matching. 2019-09-19 16:18:23 -04:00
David Ormsbee
9a1385585f Convert response bytes to str before JSON parsing. (#21375)
Convert response bytes to str before JSON parsing.
2019-08-19 11:01:55 -04:00
Dave St.Germain
5febcce20c Fix python3 compatibility in SafeCookieData and elsewhere 2019-08-19 10:24:15 -04:00
Christie Rice
fee8e17f95 REVMI-341 Stop sending lms_client_id in jwt sent to ecommerce (#21167) 2019-07-19 10:46:46 -04:00
Diana Huang
58a363e9d4 Remove microsites from commerce and theming. 2019-06-14 15:20:50 -04:00
Christie Rice
b5d07783b9 REVMI-234 Include user id in jwt sent to ecommerce (#20743)
* REVMI-234 Include user id in jwt sent to ecommerce

* Reorder params
2019-06-05 10:27:23 -04:00
Stu Young
c2dcbb36b7 incr-278 (#20581)
* run python modernize

* run isort

* quality

* qual
2019-05-16 13:20:28 -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
Nimisha Asthagiri
dc56a63e03 Remove deprecated JwtBuilder
ARCH-248
2018-10-17 07:43:59 -04:00
Jeremy Bowman
1a5bf35357 TE-2689 Remove useless pylint suppressions part 2 2018-08-14 17:39:02 -04:00
Jeremy Bowman
ca3316962d TE-2524 Stop using nose.plugins - LMS 1 2018-07-31 13:03:18 -04:00
ayub-khan
d0d3e3427e Updated intructor unenroll
If student is in refund window, refund student,
update mode to audit, and set is_active false. if
student is not in refund window, do not refund student
do not change mode, and set is_active to false.
If professional do not change mode after refund just
change is_active to false.

-
2018-07-12 16:01:12 +05:00
zubair-arbi
66937b2cdf ENT-1052 Rename enterprise customer catalog uuid in queryparam to catalog 2018-07-03 17:09:56 +05:00
zubair-arbi
bbdcf6de7a ENT-1052 discount by enterprise catalog 2018-06-29 16:04:06 +05: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
Tasawer Nawaz
4912888168 stop using deprecated single item basket view
LEARNER-4428
2018-03-14 20:29:51 +05:00
Matt Tuchfarber
4c7dc0b250 Add bundle key to program purchase button
In order for a program to be tracked as a bundle in ecommerce and GA
a bundle key must be added to the basket URL. This adds that key to
the purchase button on the program marketing page.
2018-03-07 15:40:51 -05:00
Michael LoTurco
a4f294b441 Add convenience functions for Entitlement Support Tool
Adds getter for ecommerce order dashboard url and for getting
the entitlement support details reasons.

Learner-3925
2018-03-06 17:49:08 -05:00
Albert St. Aubin
f0436aa832 Refactor of the CourseEntitlement Refund API to handle refund failures
[LEARNER-3629]

The CourseEntitlement Refund API will not respond with ERROR codes when
the attempted refund call to Ecommerce fails.
2018-01-24 14:46:58 -05:00
Albert (AJ) St. Aubin
e53013ec70 Revert "Refactor of the CourseEntitlement Refund API to handle refund failures" 2018-01-04 14:28:12 -05:00
Albert St. Aubin
417ef0583b Refactor of the CourseEntitlement Refund API to handle refund failures
[LEARNER-3629]

The CourseEntitlement Refund API will not respond with ERROR codes when
the attempted refund call to Ecommerce fails.
2018-01-04 11:02:13 -05:00
bmedx
23503f5226 Fix test issues with new httpretty 2017-12-22 15:36:45 -05:00
Albert St. Aubin
1d7443221d Entitlement API Changes to support User Revoke and Refund
[LEARNER-2668]

These changes will support a user intiated Revoke and Refund of
an Entitlement. This includes unenrolling the User from
any related Course Runs they are currently enrolled in.
2017-12-13 13:37:14 -05:00
John Eskew
80d70f6ecb Run all touched files through isort. 2017-11-09 09:25:19 -05:00
John Eskew
6672f64188 Add commerce AppConfig and use to register signals. Move imports.
Add explicit 'lms.djangoapps' prefix to all commerce imports, as another
commerce Django app exists at openedx.core.djangoapps.commerce
2017-11-09 09:24:37 -05:00
John Eskew
6294766c24 Split emitted signals from the student models file. 2017-10-05 11:12:50 -04:00
ayub-khan
32679b0423 Removed waffle flag on commerce api for default_enrollment_mode
Removed ecommerce calls for default_enrollment_mode order creation
Removed tests related to those
LEARNER-2294
2017-08-30 18:13:02 +05:00
Waheed Ahmed
c74cd970ad Added new signal to refund on un-enrollment from LMS dashboard.
LEARNER-1801
2017-08-03 14:39:05 +05:00
Marko Jevtic
75531b2fef [LEARNER-437] Reflect discount on the Program About Page (WL) 2017-06-23 17:34:06 +02:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Marko Jevtic
2422728671 LEARNER-1366 EcommerceService should be able to provide a link to the basket page that contains multiple products 2017-06-09 12:29:29 +02:00
Matt Drayer
a7f6e6a56b Consider waffle switch when selecting ecommerce workflow 2017-05-22 12:25:05 -04:00
Diana Huang
e12a704cea Add new course dates fragment.
Also add it to the course home page.
2017-05-04 20:53:42 -04:00