-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from openedx/pwnage101/ENT-8389
feat: supply `parent_content_key` to transaction when redeeming content
- Loading branch information
Showing
14 changed files
with
166 additions
and
181 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,8 +56,10 @@ class APITestBase(APITestMixin): | |
subsidy_access_policy_3_uuid = str(uuid.uuid4()) | ||
subsidy_4_transaction_1_uuid = str(uuid.uuid4()) | ||
subsidy_4_transaction_2_uuid = str(uuid.uuid4()) | ||
parent_content_key_1 = "edX+test" | ||
content_key_1 = "course-v1:edX+test+course.1" | ||
content_title_1 = "edx: Test Course 1" | ||
parent_content_key_2 = "edX+test" | ||
content_key_2 = "course-v1:edX+test+course.2" | ||
content_title_2 = "edx: Test Course 2" | ||
lms_user_email = '[email protected]' | ||
|
@@ -83,6 +85,7 @@ def setUp(self): | |
lms_user_email=self.lms_user_email, | ||
subsidy_access_policy_uuid=self.subsidy_access_policy_1_uuid, | ||
content_key=self.content_key_1, | ||
parent_content_key=self.parent_content_key_1, | ||
content_title=self.content_title_1, | ||
) | ||
self.subsidy_1_transaction_2 = TransactionFactory( | ||
|
@@ -94,6 +97,7 @@ def setUp(self): | |
lms_user_email=self.lms_user_email, | ||
subsidy_access_policy_uuid=self.subsidy_access_policy_2_uuid, | ||
content_key=self.content_key_2, | ||
parent_content_key=self.parent_content_key_2, | ||
content_title=self.content_title_2, | ||
) | ||
|
||
|
@@ -342,6 +346,7 @@ def test_can_redeem_happy_path(self, has_existing_transaction, mock_lms_user_cli | |
'lms_user_email': self.lms_user_email, | ||
'subsidy_access_policy_uuid': str(self.subsidy_access_policy_1_uuid), | ||
'content_key': self.content_key_1, | ||
'parent_content_key': self.parent_content_key_1, | ||
'content_title': self.content_title_1, | ||
'external_reference': [], | ||
'transaction_status_api_url': f"{self.transaction_status_api_url}/{self.subsidy_1_transaction_1_uuid}/", | ||
|
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.