Commit Graph

47 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
Dillon Dumesnil
e17e691d54 AA-501: Use hidden blocks to determine past due status
Blocks that were hidden by access checks would not be used when
calculating past due status for a unit. This adds in a check to
still look at those blocks, but will maintain not rendering them
when being accessed via the MFE
2021-01-06 14:11:03 +00:00
Awais Qureshi
0423434132 Fixing test failure. 2020-12-31 15:11:00 +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
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
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
Kyle McCormick
9f9a07db4f Stop the commerce API from deleting Masters course modes. 2019-07-30 11:18:23 -04:00
Stu Young
95986d162b INCR-280 Run python-modernize on lms/djangoapps/commerce/api/v1 (#20579)
* run python modernize

* run isort

* Fix quality
2019-05-21 11:41:15 -04:00
Alex Dusenbery
f35970bb39 EDUCATOR-4189 | Account for undefined values in commerce API Course objects. 2019-03-14 16:47:46 -04:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Jeremy Bowman
ca3316962d TE-2524 Stop using nose.plugins - LMS 1 2018-07-31 13:03:18 -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
bmedx
23503f5226 Fix test issues with new httpretty 2017-12-22 15:36:45 -05:00
bmedx
f3f8d8ec96 Changes necessary for Django 1.11 tests to start
- Certificates management commands updates
- Moving reverse calls in tests into setUp from class definition
- Import shuffling
- Consolidating cryptograhpy version to 1.9
2017-11-13 15:45:32 -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
Jeremy Bowman
fd6af6b05e ddt usage cleanup 2017-09-05 17:25:51 -04:00
Stuart Young
806bbc13ab remove all occurrences of flaky decorator 2017-08-08 16:23:51 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Clinton Blackburn
0b07b53e71 Updated Commerce API v1 views to use JWT authentication
LEARNER-1375
2017-06-11 19:30:20 -04:00
Clinton Blackburn
1189867dd2 Removed references to ECOMMERCE_API_SIGNING_KEY
We should not be using custom signing keys for each service at this time. We may want to return to this strategy in the future; but, this is not the direction any of our other services are going in.

ECOM-6541
2017-02-01 01:51:21 -05:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Matt Drayer
a9b7e4c63d mattdrayer/course-mode-bulk-sku: Add new CourseMode field
* mattdrayer: Add bulk checkout link to course views
* asadiqbal08: MAYN-225 replace the "Verify Now" button by the "Go to Dashboard" button in case of themed sites.
* mattdrayer: Add bulk_sku check in courseware.views
2016-05-11 10:57:24 -04:00
Ben Patterson
b9558a90f1 Create a 3rd explicit shard for unit tests.
More accurately, this creates a 4th shard because the
last shard is always the default.
2016-04-28 10:09:32 -04:00
Peter Fogg
69432015f3 Allow removing upgrade deadlines through the Commerce API. 2015-12-30 12:22:22 -05:00
Peter Fogg
45bff268ae Allow removing a verification deadline through the Commerce API.
ECOM-3268
2015-12-30 11:25:52 -05:00
Peter Fogg
497622d4b4 Switch default course mode to 'audit'.
ECOM-2972
2015-11-25 11:22:29 -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
Clinton Blackburn
9bb3f703d7 Updated receipt page to use order endpoint
The receipt page now retrieves data for orders instead of baskets. Going forward baskets will be deleted after an order has been placed, so there should be no permanent references to baskets. Orders will continue to be persisted permanently.

ECOM-2653
2015-10-28 12:12:57 -04:00
Ben Patterson
a57802ebc7 Flag test as flaky. 2015-09-24 11:36:41 -04:00
Awais
cdfc9da4d9 adding validator to make sure course exists in db before creating in otto. 2015-08-26 20:50:18 +05:00
Clinton Blackburn
b2b40e2770 Exposing course verification deadline via Commerce API
The course now supports reading and writing the verification deadline attribute.

XCOM-536
2015-08-04 14:04:04 -04:00
Clinton Blackburn
880da5a09d Exposing course name via Commerce API
The course now includes a read-only name attribute.

XCOM-536
2015-08-03 15:16:45 -04:00
Jim Abramson
3a1f9bd816 Merge pull request #9084 from edx/jsa/xcom-497
commerce/api: Don’t allow setting expiration of prof modes.
2015-07-27 17:13:03 -04:00
jsa
03717f3940 commerce/api: Don’t allow setting expiration of prof modes.
XCOM-497
2015-07-27 15:56:53 -04:00
jsa
6c83bff5be commerce/api: pass expiration_datetime when updating modes 2015-07-27 15:56:27 -04:00
Clinton Blackburn
56e9625a8f Corrected CourseMode Display Name
The Commerce API now sets the correct display name for known course modes, but continues to default to the mode slug for unknown course modes.
2015-07-27 11:26:08 -04:00
Clinton Blackburn
7d91361f32 Updated Commerce API to return CourseMode expiration date
XCOM-477
2015-07-09 15:30:48 -04:00
Clinton Blackburn
cd60dd5606 Merge pull request #8771 from edx/clintonb/currency-comparison-fix
Comparing currencies with same case
2015-07-09 01:45:39 -04:00
Clinton Blackburn
b3437b7278 Corrected path to Commerce API
XCOM-312
2015-07-08 16:55:38 -04:00
Clinton Blackburn
301a874c5c Enforcing lowercase currency for CourseMode
- CourseMode.save() always lowercases the currency value
- CourseMode currency comparisons have been updated to be case-insensitive
2015-07-06 23:38:25 -04:00
Clinton Blackburn
45de93a250 Added course endpoints for Commerce API
XCOM-314
2015-06-30 22:36:47 -04:00