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.

21 lines
696 B

  1. from hc.payments.models import Subscription
  2. from hc.test import BaseTestCase
  3. class PricingTestCase(BaseTestCase):
  4. def test_anonymous(self):
  5. r = self.client.get("/pricing/")
  6. self.assertContains(r, "Unlimited Checks", status_code=200)
  7. # A subscription object should have NOT been created
  8. assert Subscription.objects.count() == 0
  9. def test_authenticated(self):
  10. self.client.login(username="[email protected]", password="password")
  11. r = self.client.get("/pricing/")
  12. self.assertContains(r, "Unlimited Checks", status_code=200)
  13. # A subscription object should have been created
  14. assert Subscription.objects.count() == 1