mirror of
https://github.com/zulip/zulip.git
synced 2026-07-03 21:10:12 +08:00
integrations/stripe: Use global time.
This commit is contained in:
parent
a25445bf27
commit
5c8d9edaae
@ -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 <time:Nov 01, 2019, 12:00:00 UTC>
|
||||
* Current period end is now <time:Nov 01, 2019, 12:00:00 UTC>
|
||||
* Current period start is now <time:Dec 06, 2018, 05:53:55 UTC>
|
||||
* Start is now <time:Dec 06, 2018, 05:53:55 UTC>
|
||||
* 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 <time:Nov 01, 2019, 12:00:00 UTC>
|
||||
* Trial start is now <time:Dec 06, 2018, 05:53:55 UTC>"""
|
||||
self.check_webhook(
|
||||
"customer_subscription_updated",
|
||||
expected_topic_name,
|
||||
|
||||
@ -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"<time:{datetime_value}>"
|
||||
return str(value)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user