tests.py 361 B

1234567891011
  1. from django.test import TestCase
  2. from django.urls import reverse
  3. class SettingsTestCase(TestCase):
  4. def test_settings(self):
  5. url = reverse("api:get_settings")
  6. res = self.client.get(url) # Check that no auth is necessary
  7. self.assertEqual(res.status_code, 200)
  8. with self.assertNumQueries(1):
  9. self.client.get(url)