diff --git a/zerver/webhooks/stripe/tests.py b/zerver/webhooks/stripe/tests.py index 49cd4b9cc7..c9f38e0c86 100644 --- a/zerver/webhooks/stripe/tests.py +++ b/zerver/webhooks/stripe/tests.py @@ -141,13 +141,13 @@ Billing method: send invoice""" expected_topic_name = "cus_00000000000000" expected_message = """\ [Subscription](https://dashboard.stripe.com/subscriptions/sub_E6STM5w5EX3K28) updated -* Billing cycle anchor is now Nov 01, 2019, 12:00:00 UTC -* Current period end is now Nov 01, 2019, 12:00:00 UTC -* Current period start is now Dec 06, 2018, 05:53:55 UTC -* Start is now Dec 06, 2018, 05:53:55 UTC +* Billing cycle anchor is now +* Current period end is now +* Current period start is now +* Start is now * Status is now trialing -* Trial end is now Nov 01, 2019, 12:00:00 UTC -* Trial start is now Dec 06, 2018, 05:53:55 UTC""" +* Trial end is now +* Trial start is now """ self.check_webhook( "customer_subscription_updated", expected_topic_name, diff --git a/zerver/webhooks/stripe/view.py b/zerver/webhooks/stripe/view.py index fa810e3274..34ecdc5596 100644 --- a/zerver/webhooks/stripe/view.py +++ b/zerver/webhooks/stripe/view.py @@ -363,5 +363,6 @@ def linkified_id(object_id: str, lower: bool = False) -> str: def stringify(value: object) -> str: if isinstance(value, int) and value > 1500000000 and value < 2000000000: - return timestamp_to_datetime(value).strftime("%b %d, %Y, %H:%M:%S %Z") + datetime_value = timestamp_to_datetime(value).strftime("%b %d, %Y, %H:%M:%S %Z") + return f"" return str(value)