コード例 #1
0
ファイル: tests.py プロジェクト: dpetzold/python-zuora
 def test_get_payment_method_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_method(payment_method_id=mock.Mock())
     assert z.query.call_count == 1
コード例 #2
0
ファイル: tests.py プロジェクト: mapmyfitness/python-zuora
 def test_get_payment_method_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_method(payment_method_id=mock.Mock())
     assert z.query.call_count == 1
コード例 #3
0
ファイル: tests.py プロジェクト: mapmyfitness/python-zuora
 def test_create_active_account_get_payment_method_called(self):
     z = Zuora(self.zuora_settings)
     z.client = mock.Mock()
     z.get_payment_method = mock.Mock()
     z.update = mock.Mock()
     response = mock.Mock()
     response.Success = True
     z.update.return_value = [response]
     z.create_active_account(zAccount=mock.Mock(), zContact=mock.Mock(),
                             payment_method_id=mock.Mock(),
                             user=None, billing_address=None)
     assert z.get_payment_method.call_count == 1
     assert z.update.call_count == 1
コード例 #4
0
ファイル: tests.py プロジェクト: dpetzold/python-zuora
 def test_create_active_account_get_payment_method_called(self):
     z = Zuora(self.zuora_settings)
     z.client = mock.Mock()
     z.get_payment_method = mock.Mock()
     z.update = mock.Mock()
     response = mock.Mock()
     response.Success = True
     z.update.return_value = [response]
     z.create_active_account(zAccount=mock.Mock(), zContact=mock.Mock(),
                             payment_method_id=mock.Mock(),
                             user=None, billing_address=None)
     assert z.get_payment_method.call_count == 1
     assert z.update.call_count == 1