9608 re-add schema test

This commit is contained in:
Arthur 2023-03-22 11:15:10 -07:00
parent 8089386c1d
commit 6449b57f6d

View File

@ -234,24 +234,24 @@ class APIOrderingTestCase(APITestCase):
) )
# class APIDocsTestCase(TestCase): class APIDocsTestCase(TestCase):
#
# def setUp(self): def setUp(self):
# self.client = Client() self.client = Client()
#
# # Populate a CustomField to activate CustomFieldSerializer # Populate a CustomField to activate CustomFieldSerializer
# content_type = ContentType.objects.get_for_model(Site) content_type = ContentType.objects.get_for_model(Site)
# self.cf_text = CustomField(type=CustomFieldTypeChoices.TYPE_TEXT, name='test') self.cf_text = CustomField(type=CustomFieldTypeChoices.TYPE_TEXT, name='test')
# self.cf_text.save() self.cf_text.save()
# self.cf_text.content_types.set([content_type]) self.cf_text.content_types.set([content_type])
# self.cf_text.save() self.cf_text.save()
#
# def test_api_docs(self): def test_api_docs(self):
#
# url = reverse('api_docs') url = reverse('api_docs')
# params = { response = self.client.get(url)
# "format": "openapi", self.assertEqual(response.status_code, 200)
# }
# url = reverse('schema')
# response = self.client.get('{}?{}'.format(url, urllib.parse.urlencode(params))) response = self.client.get(url)
# self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)