Пример #1
0
    def test_stripe_checkout_cancelled(self):
        sub = PromotedSubscription()

        assert not sub.stripe_checkout_cancelled

        sub.update(payment_cancelled_at=datetime.datetime.now())

        assert sub.stripe_checkout_cancelled
Пример #2
0
    def test_stripe_checkout_completed(self):
        sub = PromotedSubscription()

        assert not sub.stripe_checkout_completed

        sub.update(checkout_completed_at=datetime.datetime.now())

        assert sub.stripe_checkout_completed
Пример #3
0
    def test_is_active(self):
        sub = PromotedSubscription()

        assert sub.is_active is None

        sub.update(checkout_completed_at=datetime.datetime.now())

        assert sub.is_active

        sub.update(cancelled_at=datetime.datetime.now())

        assert sub.is_active is False