def get_plans(self): # Note price is a string not a decimal or something useful: # https://github.com/braintree/braintree_python/issues/52 self.mocks['plans'].all.return_value = [ Plan(None, {'id': 'mozilla-concrete-mortar', 'price': '1'}), Plan(None, {'id': 'mozilla-concrete-brick', 'price': '10'}) ] return config.get_plans(get_client())
def get_plans(self): # Note price is a string not a decimal or something useful: # https://github.com/braintree/braintree_python/issues/52 self.mocks['plans'].all.return_value = [ Plan(None, { 'id': 'mozilla-concrete-mortar', 'price': '1' }), Plan(None, { 'id': 'mozilla-concrete-brick', 'price': '10' }) ] return config.get_plans(get_client())
def get_plans(self, plan=None): # Note price is a string not a decimal or something useful: # https://github.com/braintree/braintree_python/issues/52 plans = [ Plan(None, { 'billing_day_of_month': None, 'id': 'mozilla-concrete-mortar', 'price': '1', 'trial_period': None }), Plan(None, { 'billing_day_of_month': None, 'id': 'mozilla-concrete-brick', 'price': '10', 'trial_period': None }) ] if plan: plans.append(plan) self.mocks['plans'].all.return_value = plans return config.get_plans(get_client())