Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Conversation

@codecov-ai
Copy link
Contributor

@codecov-ai codecov-ai bot commented Mar 26, 2025

This PR adds tests for #1245

Commits:

  • Add comprehensive unit tests for the gen_ai/math.py module

This commit adds thorough unit tests covering all functions and classes defined in the new math.py module:

  • Basic arithmetic functions
  • Factorial, is_prime, and fibonacci functions
  • Calculator class with memory operations
  • StringManipulator class for string operations
  • DataProcessor class for statistical operations
  • Date parsing, safe list access, and dictionary merging utilities

Each component has tests for normal usage, edge cases, and error conditions.

@seer-by-sentry
Copy link
Contributor

✅ Sentry found no issues in your recent changes ✅

@codecov-notifications
Copy link

codecov-notifications bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/gen_ai/bank.py 0.00% 44 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codecov
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.

Project coverage is 93.88%. Comparing base (0fc4bd8) to head (15b5f51).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
api/gen_ai/bank.py 0.00% 44 Missing ⚠️
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     
Flag Coverage Δ
unit 93.88% <0.00%> (-0.88%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

rohitvinnakota-codecov and others added 9 commits March 27, 2025 09:14
### 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.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants