don't need paypal for other payment methods
This commit is contained in:
Родитель
48b55bc6c2
Коммит
86821cf78a
|
@ -905,7 +905,8 @@ class Addon(amo.models.OnChangeMixin, amo.models.ModelBase):
|
|||
return self.premium_type in amo.ADDON_PREMIUMS
|
||||
|
||||
def needs_paypal(self):
|
||||
return self.premium_type != amo.ADDON_FREE
|
||||
return (self.premium_type not in
|
||||
(amo.ADDON_FREE, amo.ADDON_PREMIUM_OTHER))
|
||||
|
||||
def can_be_purchased(self):
|
||||
return self.is_premium() and self.status in amo.REVIEWED_STATUSES
|
||||
|
|
|
@ -1845,6 +1845,10 @@ class TestMarketplace(amo.tests.TestCase):
|
|||
self.addon.update(premium_type=amo.ADDON_FREE)
|
||||
assert not self.addon.needs_paypal()
|
||||
|
||||
def test_other_payments(self):
|
||||
self.addon.update(premium_type=amo.ADDON_PREMIUM_OTHER)
|
||||
assert not self.addon.needs_paypal()
|
||||
|
||||
def test_needs_paypal(self):
|
||||
for status in [amo.ADDON_PREMIUM, amo.ADDON_PREMIUM_INAPP,
|
||||
amo.ADDON_FREE_INAPP]:
|
||||
|
|
Загрузка…
Ссылка в новой задаче