-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Enable mobile payments for new upcoming courses #15
base: 2u/main
Are you sure you want to change the base?
Conversation
892f9fb
to
1791e2f
Compare
self._update_mobile_seats(mobile_seats, web_seat, course) | ||
else: | ||
logger.info("Creating mobile seats for course [%s]", course.id) | ||
create_mobile_seat(ANDROID_SKU_PREFIX, web_seat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap create_mobile_seat
calls in try-except to catch specific failures (e.g., Android or iOS creation).
something like this
create_mobile_seat(ANDROID_SKU_PREFIX, web_seat) | |
try: | |
create_mobile_seat(ANDROID_SKU_PREFIX, web_seat) | |
except Exception as e: | |
logger.error("Failed to create Android mobile seat for course [%s]: %s", course.id, str(e)) | |
return |
self.create_course_and_seats() | ||
updated_data = self.generate_update_payload() | ||
|
||
with mock.patch.object(LMSPublisher, 'publish') as mock_publish: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove mock from here and add something like this
with mock.patch.object(LMSPublisher, 'publish') as mock_publish: | |
@mock.patch.object(LMSPublisher, 'publish', return_value=None) | |
def test_course_update_creates_ios_seat_when_feature_enabled(self, mock_publish, mock_create_ios_product): |
⛔️ MAIN BRANCH WARNING! 2U EMPLOYEES must make branches against the 2u/main BRANCH
Required Testing
(^ We can remove that manual check once REV-2624 is done and the corresponding e2e test runs again)
Description
This PR enables mobile payments for upcoming courses. Whenever a new course is published through publisher ecommerce creates a web seat for it, this PR will create two mobile seats(for ios and android) alongside that mobile seat. In addition ios product will also be created on appstore.
Useful information to include:
Supporting information
Jira ticket: https://2u-internal.atlassian.net/browse/LEARNER-9951
Testing instructions
Other information
Include anything else that will help reviewers and consumers understand the change.