Add tests for browsable API endpoints

This commit is contained in:
Jeremy Stretch
2020-01-15 17:47:55 -05:00
parent b9b07d2891
commit fc9b5a5adf
7 changed files with 56 additions and 7 deletions

View File

@@ -18,7 +18,14 @@ from utilities.testing import APITestCase, choices_to_dict
from virtualization.models import Cluster, ClusterType
class ChoicesTest(APITestCase):
class AppTest(APITestCase):
def test_root(self):
url = reverse('dcim-api:api-root')
response = self.client.get('{}?format=api'.format(url), **self.header)
self.assertEqual(response.status_code, 200)
def test_choices(self):