tests.py 417 B

1234567891011121314
  1. from django.shortcuts import reverse
  2. from django.test import TestCase
  3. class DocsTestCase(TestCase):
  4. def test_redoc(self):
  5. url = reverse("schema-redoc")
  6. res = self.client.get(url)
  7. self.assertEqual(res.status_code, 200)
  8. def test_openapi(self):
  9. url = reverse("schema-redoc") + "?format=openapi"
  10. res = self.client.get(url)
  11. self.assertEqual(res.status_code, 200)