feat: add CalculateEnterpriseDiscountedPrice pipeline step for course mode checkout - #2556
Merged
Conversation
This was referenced Mar 5, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2556 +/- ##
==========================================
+ Coverage 86.70% 86.72% +0.01%
==========================================
Files 259 260 +1
Lines 17017 17041 +24
Branches 1681 1683 +2
==========================================
+ Hits 14754 14778 +24
Misses 1927 1927
Partials 336 336
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kiram15
force-pushed
the
pwnage101/ENT-11573
branch
4 times, most recently
from
June 26, 2026 23:31
82cfc44 to
6aede7d
Compare
kiram15
marked this pull request as ready for review
June 29, 2026 20:31
pwnage101
commented
Jul 2, 2026
13 tasks
kiram15
force-pushed
the
pwnage101/ENT-11573
branch
3 times, most recently
from
July 8, 2026 06:15
e7d3244 to
b33c2df
Compare
pwnage101
commented
Jul 14, 2026
pwnage101
commented
Jul 14, 2026
pwnage101
commented
Jul 14, 2026
kiram15
force-pushed
the
pwnage101/ENT-11573
branch
from
July 14, 2026 20:11
4c59c7a to
9f16204
Compare
pwnage101
commented
Jul 14, 2026
kiram15
force-pushed
the
pwnage101/ENT-11573
branch
3 times, most recently
from
July 15, 2026 22:16
2707576 to
a34f7ab
Compare
kiram15
force-pushed
the
pwnage101/ENT-11573
branch
2 times, most recently
from
July 15, 2026 23:20
401d2fc to
726bcd1
Compare
kiram15
force-pushed
the
pwnage101/ENT-11573
branch
from
July 16, 2026 15:27
726bcd1 to
d234402
Compare
kiram15
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://2u-internal.atlassian.net/browse/ENT-11573
openedx-filters #338 — CourseModePriceRequested filter definition
edx-enterprise #2556 — CalculateEnterpriseDiscountedPrice pipeline step
edx-platform #365 — view wired to invoke the filter
Prerequisites: local devstack running with all three branches installed (Runbook); an enterprise customer, an enterprise learner, and a course with a verified mode that has a non-empty SKU and a future expiration date.
E2E Testing Instructions:
Note: replace any enterprise customer uuids, users, or course keys with your own applicable local data.
In lms/envs/devstack.py, confirm/add, then restart after to capture changes:
Test 1: Check if pipeline correctly hooked up, and then check against control user with no enterprise link
Write the test file in lms-shell
Then execute the file in the bash script
exec(open('/tmp/test1.py').read())Expected: choose status: 200, contains '149': True.
Test 2: Check against enterprise-linked user with SKU present on course
Expected: no /logout in the log, choose status: 200, log line [e-commerce calculate endpoint] The discounted price for sku [8CF08E5]... is [149.0] confirming the ecommerce call happened and returned the (undiscounted) price.
Test 3: Check against enterprise-linked user, verified mode with no SKU
Create a no-SKU verified mode on a second course — inside make lms-shell, at >>>:
Expected: choose status: 200, contains '100': True, and — the key check — no [e-commerce calculate endpoint] log line, confirming the SKU guard blocked the ecommerce call entirely.