This repository was archived by the owner on Jun 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Add Tests for PR#1245 #1253
Closed
codecov-ai
wants to merge
10
commits into
rvinnakota/update-stuff
from
ai-tests-for-pr1245-1743026360
Closed
Add Tests for PR#1245 #1253
codecov-ai
wants to merge
10
commits into
rvinnakota/update-stuff
from
ai-tests-for-pr1245-1743026360
Conversation
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
Contributor
✅ Sentry found no issues in your recent changes ✅ |
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## rvinnakota/update-stuff #1253 +/- ##
===========================================================
- Coverage 94.75% 93.88% -0.88%
===========================================================
Files 493 494 +1
Lines 16931 16973 +42
===========================================================
- Hits 16043 15935 -108
- Misses 888 1038 +150
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
### Commits: - Add focused tests for Stripe webhook handlers This commit adds a new test file specifically focused on the Stripe webhook handlers that were simplified in the billing/views.py changes. The tests verify the critical functionality: - Invoice payment success handling (delinquency flags and email notifications) - Invoice payment failure handling (delinquency flags and email notifications) - Subscription deletion handling (plan reset and repository deactivation) These tests ensure that despite the code simplification, the core functionality of the webhook handlers remains intact.
### Commits: - Add unit tests for modified billing webhook payment handlers This commit adds tests for the streamlined invoice payment handling in the billing/views.py file: - Tests for invoice_payment_succeeded function including delinquent status updates and email notifications - Tests for invoice_payment_failed function including conditional delinquent status handling - Tests for the payment intent verification flow These tests ensure proper coverage of the modified payment handling logic in the billing webhook handler. - Add unit tests for subscription handling in billing webhook This commit adds tests for the subscription handling functionality in billing/views.py: - Tests for customer_subscription_deleted including plan reset and repository deactivation - Tests for customer_subscription_created including ID setting and plan updates - Tests for the payment verification method used with asynchronous payment methods - Tests for handling repositories when subscriptions change These tests ensure the subscription lifecycle is properly handled in the Stripe webhook handler. - Add unit tests for payment method handling in webhook handler This commit adds tests for the payment method handling functionality in billing/views.py: - Tests for delayed notification handling with bank account verification - Tests for payment intent success handling - Tests for payment method attachment and default setting These tests ensure payment methods are properly handled for asynchronous payment flows.
### Commits: - Add tests for invoice payment succeeded functionality This commit adds comprehensive unit tests for the invoice_payment_succeeded method in the StripeWebhookHandler class, covering: - Setting delinquent status to false when payment succeeds - Sending notification emails to owners and admins - Handling cases with no matching owners - Handling cases with multiple owners sharing same subscription These tests ensure that the invoice payment success handling works correctly after recent modifications. - Add tests for invoice payment failure functionality This commit adds comprehensive unit tests for the invoice_payment_failed method in the StripeWebhookHandler class, covering: - Skipping delinquency for payments requiring microdeposit verification - Setting delinquent status to true for normal payment failures - Sending notification emails to owners and admin users These tests ensure that the recent changes to invoice payment failure handling work correctly. - Add tests for Stripe webhook request handling This commit adds unit tests for the webhook handling functionality in StripeWebhookHandler, including: - Validation of webhook signatures - Handling of supported and unsupported event types - Error handling for missing configuration These tests ensure that the webhook endpoint properly validates and routes Stripe events to the appropriate handler methods.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR adds tests for #1245
Commits:
This commit adds thorough unit tests covering all functions and classes defined in the new math.py module:
Each component has tests for normal usage, edge cases, and error conditions.