Skip to content

Commit

Permalink
fix(chargebee): ensure that missing api calls are handled correctly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell authored Dec 10, 2024
1 parent 4f20e5a commit 38b4300
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/organisations/subscriptions/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BaseSubscriptionMetadata:
def __init__(
self,
seats: int = 0,
api_calls: None | int = None,
api_calls: int = 0,
projects: None | int = None,
chargebee_email: None | str = None,
audit_log_visibility_days: int | None = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ def test_base_subscription_metadata_add_raises_error_if_not_matching_payment_sou
SourceASubscriptionMetadata(seats=1, api_calls=50000, projects=1),
SourceASubscriptionMetadata(seats=2, api_calls=100000, projects=None),
),
(
SourceASubscriptionMetadata(seats=1, api_calls=50000),
SourceASubscriptionMetadata(seats=1),
SourceASubscriptionMetadata(seats=2, api_calls=50000),
),
),
)
def test_base_subscription_metadata_add(add_to, add, expected_result):
Expand Down

0 comments on commit 38b4300

Please sign in to comment.