-
Notifications
You must be signed in to change notification settings - Fork 253
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
Management command to update voucher names and make them unique #4134
Conversation
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.
Please add a test that runs the management command twice to prove it is idempotent.
Additionally, should this be aware of the name length much like your database migration is? I think that needs to be reflected in this code, and a test should be added for that as well.
1bd3c0e
to
d0246fa
Compare
fix: sorted imports Fix: Support create-mobile-skus to run again if failed (#4129) * fix: Support create-mobile-skus to run again if we found an error previously fix: Enable enrollment code purchase with mobile seats (#4130) * fix: Enable enrollment code purchase with mobile seats * test: Add unit test --------- Co-authored-by: Abdul Moeez Zahid <abdul.moeez@A006-01420.local> fix: PEP8 conventions fix: import issue chore: added more test cases fix: added new line at the end of file fix: blank line issue fix: long line issue fix: pylint issues fix: import issues fix: removed extra blank line fix: updated test fix: issues in command fix:: isort issue
d0246fa
to
b405ec9
Compare
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.
thank you for adding the additional tests
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.
LGTM
for voucher in vouchers: | ||
assert voucher.name == f'{voucher.id} - {self.voucher_name}' | ||
|
||
def test_update_voucher_names_long_name(self): |
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.
Nice addition!
* chore: Added management command to update voucher names to be unique --------- Co-authored-by: Chris Pappas <christopappas@users.noreply.github.com> Co-authored-by: Chris Pappas <cpappas@edx.org>
* chore: Added management command to update voucher names to be unique --------- Co-authored-by: Chris Pappas <christopappas@users.noreply.github.com> Co-authored-by: Chris Pappas <cpappas@edx.org>
* chore: Added management command to update voucher names to be unique --------- Co-authored-by: Chris Pappas <christopappas@users.noreply.github.com> Co-authored-by: Chris Pappas <cpappas@edx.org>
* chore: Added management command to update voucher names to be unique --------- Co-authored-by: Chris Pappas <christopappas@users.noreply.github.com> Co-authored-by: Chris Pappas <cpappas@edx.org>
…edx#4134) * chore: Added management command to update voucher names to be unique --------- Co-authored-by: Chris Pappas <christopappas@users.noreply.github.com> Co-authored-by: Chris Pappas <cpappas@edx.org>
⛔️ MAIN BRANCH WARNING! 2U EMPLOYEES must make branches against the 2u/main BRANCH
⛔️ DEPRECATION WARNING
This repository is deprecated and in maintainence-only operation while we work on a replacement, please see this announcement for more information.
Although we have stopped integrating new contributions, we always appreciate security disclosures and patches sent to security@edx.org
Anyone internally merging to this repository is expected to release and monitor their changes; if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released.
Required Testing
(^ We can remove that manual check once REV-2624 is done and the corresponding e2e test runs again)
Description
Describe what this pull request changes, and why these changes were made. How will these changes affect other people, installations of edx, etc.?
Please include links to any relevant ADRs, design artifacts, and decision documents. Make sure to document the rationale behind significant changes in the repo, per OEP-19, and can be
linked here.
Useful information to include:
Supporting information
Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.
Testing instructions
Please provide detailed step-by-step instructions for testing this change; how did YOU test this change?
Other information
Include anything else that will help reviewers and consumers understand the change.