You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
506 B

  1. from mock import patch
  2. from hc.payments.models import Subscription
  3. from hc.test import BaseTestCase
  4. class SetPlanTestCase(BaseTestCase):
  5. @patch("hc.payments.models.braintree")
  6. def test_it_saves_send_invoices_flag(self, mock):
  7. self.client.login(username="[email protected]", password="password")
  8. form = {"save_send_invoices": True}
  9. self.client.post("/accounts/profile/billing/", form)
  10. sub = Subscription.objects.get()
  11. self.assertFalse(sub.send_invoices)