Пример #1
0
 def test_update_product_ammendment_update_called(self):
     z = Zuora(self.zuora_settings)
     z.client = mock.Mock()
     z.update = mock.Mock()
     response = mock.Mock()
     response.Success = True
     z.update.return_value = [response]
     z.update_product_amendment(effective_date=mock.Mock(),
                             zAmendment=mock.Mock())
     assert z.update.call_count == 1
Пример #2
0
 def test_update_product_ammendment_update_called(self):
     z = Zuora(self.zuora_settings)
     z.client = mock.Mock()
     z.update = mock.Mock()
     response = mock.Mock()
     response.Success = True
     z.update.return_value = [response]
     z.update_product_amendment(effective_date=mock.Mock(),
                             zAmendment=mock.Mock())
     assert z.update.call_count == 1
Пример #3
0
 def test_cancel_subscription_update_called(self):
     z = Zuora(self.zuora_settings)
     z.create_product_amendment = mock.Mock()
     z.update_product_amendment = mock.Mock()
     z.cancel_subscription(subscription_id=mock.Mock())
     assert z.create_product_amendment.call_count == 1
     assert z.update_product_amendment.call_count == 1
Пример #4
0
 def test_cancel_subscription_update_called(self):
     z = Zuora(self.zuora_settings)
     z.create_product_amendment = mock.Mock()
     z.update_product_amendment = mock.Mock()
     z.cancel_subscription(subscription_id=mock.Mock())
     assert z.create_product_amendment.call_count == 1
     assert z.update_product_amendment.call_count == 1
Пример #5
0
 def test_add_product_ammendment_create_called(self):
     z = Zuora(self.zuora_settings)
     z.client = mock.Mock()
     z.create = mock.Mock()
     z.create_product_amendment = mock.Mock()
     z.update_product_amendment = mock.Mock()
     response = mock.Mock()
     response.Success = True
     z.create.return_value = [response]
     z.add_product_amendment(name='test',
                             subscription_id=mock.Mock(),
                             product_rate_plan_id=mock.Mock())
     assert z.create_product_amendment.call_count == 1
     assert z.create.call_count == 1
Пример #6
0
 def test_add_product_ammendment_create_called(self):
     z = Zuora(self.zuora_settings)
     z.client = mock.Mock()
     z.create = mock.Mock()
     z.create_product_amendment = mock.Mock()
     z.update_product_amendment = mock.Mock()
     response = mock.Mock()
     response.Success = True
     z.create.return_value = [response]
     z.add_product_amendment(name='test',
                             subscription_id=mock.Mock(),
                             product_rate_plan_id=mock.Mock())
     assert z.create_product_amendment.call_count == 1
     assert z.create.call_count == 1