corporate: Remove now unused is_sponsored_realm.

This has been replaced with the is_sponsored method in
the RealmBillingSession class.
This commit is contained in:
Lauryn Menard 2023-12-04 14:41:15 +01:00 committed by Tim Abbott
parent 5eabd51702
commit 45df5750ae
2 changed files with 0 additions and 13 deletions

View File

@ -3145,10 +3145,6 @@ def is_realm_on_free_trial(realm: Realm) -> bool:
return plan is not None and plan.is_free_trial() return plan is not None and plan.is_free_trial()
def is_sponsored_realm(realm: Realm) -> bool:
return realm.plan_type == Realm.PLAN_TYPE_STANDARD_FREE
def do_change_plan_status(plan: CustomerPlan, status: int) -> None: def do_change_plan_status(plan: CustomerPlan, status: int) -> None:
plan.status = status plan.status = status
plan.save(update_fields=["status"]) plan.save(update_fields=["status"])

View File

@ -67,7 +67,6 @@ from corporate.lib.stripe import (
invoice_plans_as_needed, invoice_plans_as_needed,
is_free_trial_offer_enabled, is_free_trial_offer_enabled,
is_realm_on_free_trial, is_realm_on_free_trial,
is_sponsored_realm,
next_month, next_month,
sign_string, sign_string,
stripe_customer_has_credit_card_as_default_payment_method, stripe_customer_has_credit_card_as_default_payment_method,
@ -4558,14 +4557,6 @@ class BillingHelpersTest(ZulipTestCase):
plan.save(update_fields=["status"]) plan.save(update_fields=["status"])
self.assertTrue(is_realm_on_free_trial(realm)) self.assertTrue(is_realm_on_free_trial(realm))
def test_is_sponsored_realm(self) -> None:
realm = get_realm("zulip")
self.assertFalse(is_sponsored_realm(realm))
realm.plan_type = Realm.PLAN_TYPE_STANDARD_FREE
realm.save()
self.assertTrue(is_sponsored_realm(realm))
def test_change_remote_server_plan_type(self) -> None: def test_change_remote_server_plan_type(self) -> None:
server_uuid = str(uuid.uuid4()) server_uuid = str(uuid.uuid4())
remote_server = RemoteZulipServer.objects.create( remote_server = RemoteZulipServer.objects.create(