diff --git a/stubs/stripe/util/__init__.pyi b/stubs/stripe/util/__init__.pyi index 298bb7abe6..101a4099a9 100644 --- a/stubs/stripe/util/__init__.pyi +++ b/stubs/stripe/util/__init__.pyi @@ -1,5 +1,4 @@ from typing import Any, Dict -from stripe.api_resources.list_object import ListObject -def convert_to_stripe_object(fixture_data: Dict[Any, Any]) -> ListObject: +def convert_to_stripe_object(fixture_data: Dict[Any, Any]) -> Any: ... diff --git a/zilencer/tests/test_stripe.py b/zilencer/tests/test_stripe.py index efc11334d2..d78cfd177e 100644 --- a/zilencer/tests/test_stripe.py +++ b/zilencer/tests/test_stripe.py @@ -21,16 +21,16 @@ from zilencer.models import Customer, Plan fixture_data_file = open(os.path.join(os.path.dirname(__file__), 'stripe_fixtures.json'), 'r') fixture_data = ujson.load(fixture_data_file) -def mock_create_customer(*args: Any, **kwargs: Any) -> ListObject: +def mock_create_customer(*args: Any, **kwargs: Any) -> stripe.Customer: return stripe.util.convert_to_stripe_object(fixture_data["create_customer"]) -def mock_create_subscription(*args: Any, **kwargs: Any) -> ListObject: +def mock_create_subscription(*args: Any, **kwargs: Any) -> stripe.Subscription: return stripe.util.convert_to_stripe_object(fixture_data["create_subscription"]) -def mock_customer_with_active_subscription(*args: Any, **kwargs: Any) -> ListObject: +def mock_customer_with_active_subscription(*args: Any, **kwargs: Any) -> stripe.Customer: return stripe.util.convert_to_stripe_object(fixture_data["customer_with_active_subscription"]) -def mock_upcoming_invoice(*args: Any, **kwargs: Any) -> ListObject: +def mock_upcoming_invoice(*args: Any, **kwargs: Any) -> stripe.Invoice: return stripe.util.convert_to_stripe_object(fixture_data["upcoming_invoice"]) class StripeTest(ZulipTestCase):