1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Consolidate GraphQLTestCase into APIViewTestCase

This commit is contained in:
jeremystretch
2021-06-30 10:07:33 -04:00
parent 728b3bac67
commit e6091ee0c9
8 changed files with 82 additions and 87 deletions

View File

@ -15,7 +15,7 @@ class AppTest(APITestCase):
self.assertEqual(response.status_code, 200)
class ProviderTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
class ProviderTest(APIViewTestCases.APIViewTestCase):
model = Provider
brief_fields = ['circuit_count', 'display', 'id', 'name', 'slug', 'url']
create_data = [
@ -47,7 +47,7 @@ class ProviderTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTes
Provider.objects.bulk_create(providers)
class CircuitTypeTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
class CircuitTypeTest(APIViewTestCases.APIViewTestCase):
model = CircuitType
brief_fields = ['circuit_count', 'display', 'id', 'name', 'slug', 'url']
create_data = (
@ -79,7 +79,7 @@ class CircuitTypeTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIView
CircuitType.objects.bulk_create(circuit_types)
class CircuitTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
class CircuitTest(APIViewTestCases.APIViewTestCase):
model = Circuit
brief_fields = ['cid', 'display', 'id', 'url']
bulk_update_data = {
@ -127,7 +127,7 @@ class CircuitTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTest
]
class CircuitTerminationTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
class CircuitTerminationTest(APIViewTestCases.APIViewTestCase):
model = CircuitTermination
brief_fields = ['_occupied', 'cable', 'circuit', 'display', 'id', 'term_side', 'url']
@ -180,7 +180,7 @@ class CircuitTerminationTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.
}
class ProviderNetworkTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
class ProviderNetworkTest(APIViewTestCases.APIViewTestCase):
model = ProviderNetwork
brief_fields = ['display', 'id', 'name', 'url']