Fix failing tests due to missing time freeze
[skip ci]
@@ -26,6 +26,8 @@ from src.webhooks.tests.handlers.stripe.payloads import (
async def _(db=db):
subscription = await SubscriptionFactory(user_id=1)
await StripeCustomerFactory(user_id=1, stripe_customer_id="cus_customer_id")
+
+ with time_machine.travel("2022-02-10 12:00:00", tick=False):
await handle_invoice_paid(INVOICE_PAID_PAYLOAD)
subscription = await Subscription.objects.select_related(
@@ -58,6 +60,7 @@ async def _(db=db):
subscription = await SubscriptionFactory(user_id=1)
await StripeCustomerFactory(user_id=1, stripe_customer_id="cus_customer_id")
+ with time_machine.travel("2022-02-10 12:00:00", tick=False):
await handle_invoice_paid(INVOICE_PAID_PAYLOAD)
subscription = await Subscription.objects.select_related(
