mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 17:26:10 -06:00
9608 re-add schema test
This commit is contained in:
parent
8089386c1d
commit
6449b57f6d
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user