mirror of https://github.com/zulip/zulip.git
billing: Rename RealmAuditLog.REALM_PLAN_STARTED.
This commit is contained in:
parent
d33d7e1c28
commit
abc044e869
|
@ -2170,7 +2170,7 @@ class RealmAuditLog(models.Model):
|
|||
|
||||
STRIPE_CUSTOMER_CREATED = 'stripe_customer_created'
|
||||
STRIPE_CARD_ADDED = 'stripe_card_added'
|
||||
REALM_PLAN_STARTED = 'realm_plan_started'
|
||||
STRIPE_PLAN_CHANGED = 'stripe_plan_changed'
|
||||
REALM_PLAN_QUANTITY_RESET = 'realm_plan_quantity_reset'
|
||||
|
||||
USER_CREATED = 'user_created'
|
||||
|
|
|
@ -167,7 +167,7 @@ def do_subscribe_customer_to_plan(stripe_customer: stripe.Customer, stripe_plan_
|
|||
RealmAuditLog.objects.create(
|
||||
realm=customer.realm,
|
||||
acting_user=customer.billing_user,
|
||||
event_type=RealmAuditLog.REALM_PLAN_STARTED,
|
||||
event_type=RealmAuditLog.STRIPE_PLAN_CHANGED,
|
||||
event_time=timestamp_to_datetime(stripe_subscription.created),
|
||||
extra_data=ujson.dumps({'plan': stripe_plan_id, 'quantity': seat_count}))
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ class StripeTest(ZulipTestCase):
|
|||
self.assertEqual(audit_log_entries, [
|
||||
(RealmAuditLog.STRIPE_CUSTOMER_CREATED, timestamp_to_datetime(self.customer_created)),
|
||||
(RealmAuditLog.STRIPE_CARD_ADDED, timestamp_to_datetime(self.customer_created)),
|
||||
(RealmAuditLog.REALM_PLAN_STARTED, timestamp_to_datetime(self.subscription_created)),
|
||||
(RealmAuditLog.STRIPE_PLAN_CHANGED, timestamp_to_datetime(self.subscription_created)),
|
||||
])
|
||||
# Check that we correctly updated Realm
|
||||
realm = get_realm("zulip")
|
||||
|
@ -202,7 +202,7 @@ class StripeTest(ZulipTestCase):
|
|||
self.assertEqual(audit_log_entries, [
|
||||
(RealmAuditLog.STRIPE_CUSTOMER_CREATED, timestamp_to_datetime(self.customer_created), False),
|
||||
(RealmAuditLog.STRIPE_CARD_ADDED, timestamp_to_datetime(self.customer_created), False),
|
||||
(RealmAuditLog.REALM_PLAN_STARTED, timestamp_to_datetime(self.subscription_created), False),
|
||||
(RealmAuditLog.STRIPE_PLAN_CHANGED, timestamp_to_datetime(self.subscription_created), False),
|
||||
(RealmAuditLog.REALM_PLAN_QUANTITY_RESET, timestamp_to_datetime(self.subscription_created), True),
|
||||
])
|
||||
self.assertEqual(ujson.loads(RealmAuditLog.objects.filter(
|
||||
|
|
Loading…
Reference in New Issue