def test_get_payment_methods_query_called(self): z = Zuora(self.zuora_settings) z.query = mock.Mock() response = mock.Mock() response.records = [1] z.query.return_value = response z.get_payment_methods(account_id=mock.Mock(), email='*****@*****.**', phone=mock.Mock()) assert z.query.call_count == 1
def test_get_payment_methods_get_payment_method_called(self): z = Zuora(self.zuora_settings) z.query = mock.Mock() response = mock.Mock() zAccount = mock.Mock() zAccount.DefaultPaymentMethodId = mock.Mock() response.records = [zAccount] z.query.return_value = response z.get_payment_methods(account_number=mock.Mock()) assert z.query.call_count == 2