def test_has_valid_permissions_token_ignore(self): ap = AddonPremium(addon=self.addon) assert ap.has_valid_permissions_token() ap.paypal_permissions_token = 'asd' assert ap.has_valid_permissions_token()
def test_has_valid_permissions_token(self, check_permission): ap = AddonPremium(addon=self.addon) assert not ap.has_valid_permissions_token() check_permission.return_value = True ap.paypal_permissions_token = 'some_token' assert ap.has_valid_permissions_token()
def test_has_permissions_token(self): ap = AddonPremium(addon=self.addon) assert not ap.has_permissions_token() ap.paypal_permissions_token = 'asd' assert ap.has_permissions_token()