示例#1
0
 def test_pro_invoice_receipt(self, mock_send):
     """A receipt should be sent after a pro subscription payment is made."""
     mock_subscription.plan.id = 'pro'
     customer_id = 'test-pro'
     ProfileFactory(customer_id=customer_id)
     mock_invoice.customer = customer_id
     tasks.send_invoice_receipt(mock_invoice.id)
     mock_send.assert_called_with(fail_silently=False)
示例#2
0
 def test_org_invoice_receipt(self, mock_send):
     """A receipt should be sent after an org subscription payment is made."""
     mock_subscription.plan.id = 'org'
     customer_id = 'test-org'
     owner = UserFactory(profile__customer_id=customer_id)
     OrganizationFactory(owner=owner)
     mock_invoice.customer = customer_id
     tasks.send_invoice_receipt(mock_invoice.id)
     mock_send.assert_called_with(fail_silently=False)