Add unit tests for MOCAPrepaidInvoice#297
Merged
QuanMPhm merged 1 commit intoJun 15, 2026
Merged
Conversation
QuanMPhm
approved these changes
Jun 4, 2026
knikolla
approved these changes
Jun 9, 2026
|
|
||
| def new_moca_prepaid_invoice( | ||
| name="", | ||
| invoice_month="0000-00", |
Contributor
There was a problem hiding this comment.
Nitpick: This invoice month default parameter is highly unrealistic as no month 0 can exist. When implementing test data like this it is usually a good idea to stick with data that would be acceptable during normal operation.
Contributor
|
@marcoagonzales007 Can you update the commit message based on my comment above? You can also implement @knikolla's comment if you'd like. Afterwards, feel free to merge the PR. Let me know if you see that you're unable to merge |
part of CCI-MOC#185 Adds unit tests for MOCAPrepaidInvoice, bringing coverage from 73% to 100%. Tests Added: test_prepare_export : verifies that only rows where MGHPCC Managed is False are included in the export test_output_path : verifies the output filename is correctly formatted with the invoice month test_output_s3_key : verifies the S3 path is correctly formatted test_output_s3_archive_key : verifies the S3 archive path is correctly formatted Also adds new_moca_prepaid_invoice() to tests/util.py to follow the existing pattern used by all other invoices.
99cc76c to
c86991c
Compare
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.
part of #185
Adds unit tests for
MOCAPrepaidInvoice, bringing coverage from 73% to 100%.Tests Added:
test_prepare_export: verifies that only rows where MGHPCC Managed is False are included in the exporttest_output_path: verifies the output filename is correctly formatted with the invoice monthtest_output_s3_key: verifies the S3 path is correctly formattedtest_output_s3_archive_key: verifies the S3 archive path is correctly formattedAlso adds
new_moca_prepaid_invoice()to tests/util.py to follow the existing pattern used by all other invoices.