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:
@ -17,7 +17,7 @@ class AppTest(APITestCase):
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
class ClusterTypeTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
||||
class ClusterTypeTest(APIViewTestCases.APIViewTestCase):
|
||||
model = ClusterType
|
||||
brief_fields = ['cluster_count', 'display', 'id', 'name', 'slug', 'url']
|
||||
create_data = [
|
||||
@ -49,7 +49,7 @@ class ClusterTypeTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIView
|
||||
ClusterType.objects.bulk_create(cluster_types)
|
||||
|
||||
|
||||
class ClusterGroupTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
||||
class ClusterGroupTest(APIViewTestCases.APIViewTestCase):
|
||||
model = ClusterGroup
|
||||
brief_fields = ['cluster_count', 'display', 'id', 'name', 'slug', 'url']
|
||||
create_data = [
|
||||
@ -81,7 +81,7 @@ class ClusterGroupTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIVie
|
||||
ClusterGroup.objects.bulk_create(cluster_Groups)
|
||||
|
||||
|
||||
class ClusterTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
||||
class ClusterTest(APIViewTestCases.APIViewTestCase):
|
||||
model = Cluster
|
||||
brief_fields = ['display', 'id', 'name', 'url', 'virtualmachine_count']
|
||||
bulk_update_data = {
|
||||
@ -129,7 +129,7 @@ class ClusterTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTest
|
||||
]
|
||||
|
||||
|
||||
class VirtualMachineTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
||||
class VirtualMachineTest(APIViewTestCases.APIViewTestCase):
|
||||
model = VirtualMachine
|
||||
brief_fields = ['display', 'id', 'name', 'url']
|
||||
bulk_update_data = {
|
||||
@ -205,7 +205,7 @@ class VirtualMachineTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIV
|
||||
self.assertHttpStatus(response, status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
|
||||
class VMInterfaceTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
||||
class VMInterfaceTest(APIViewTestCases.APIViewTestCase):
|
||||
model = VMInterface
|
||||
brief_fields = ['display', 'id', 'name', 'url', 'virtual_machine']
|
||||
bulk_update_data = {
|
||||
|
Reference in New Issue
Block a user