示例#1
0
 def test_create_product_ammendment_create_called(self):
     z = Zuora(self.zuora_settings)
     z.client = mock.Mock()
     z.create = mock.Mock()
     response = mock.Mock()
     response.Success = True
     z.create.return_value = [response]
     z.create_product_amendment(effective_date=mock.Mock(),
                             subscription_id=mock.Mock(),
                             name_prepend='something',
                             amendment_type=mock.Mock())
     assert z.create.call_count == 1
示例#2
0
 def test_create_product_ammendment_create_called(self):
     z = Zuora(self.zuora_settings)
     z.client = mock.Mock()
     z.create = mock.Mock()
     response = mock.Mock()
     response.Success = True
     z.create.return_value = [response]
     z.create_product_amendment(effective_date=mock.Mock(),
                             subscription_id=mock.Mock(),
                             name_prepend='something',
                             amendment_type=mock.Mock())
     assert z.create.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