|
@@ -20,7 +20,7 @@ class AppTest(APITestCase):
|
|
|
self.assertEqual(response.status_code, 200)
|
|
self.assertEqual(response.status_code, 200)
|
|
|
|
|
|
|
|
|
|
|
|
|
-class VRFTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class VRFTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = VRF
|
|
model = VRF
|
|
|
brief_fields = ['display', 'id', 'name', 'prefix_count', 'rd', 'url']
|
|
brief_fields = ['display', 'id', 'name', 'prefix_count', 'rd', 'url']
|
|
|
create_data = [
|
|
create_data = [
|
|
@@ -52,7 +52,7 @@ class VRFTest(APIViewTestCases.APIViewTestCase):
|
|
|
VRF.objects.bulk_create(vrfs)
|
|
VRF.objects.bulk_create(vrfs)
|
|
|
|
|
|
|
|
|
|
|
|
|
-class RouteTargetTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class RouteTargetTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = RouteTarget
|
|
model = RouteTarget
|
|
|
brief_fields = ['display', 'id', 'name', 'url']
|
|
brief_fields = ['display', 'id', 'name', 'url']
|
|
|
create_data = [
|
|
create_data = [
|
|
@@ -81,7 +81,7 @@ class RouteTargetTest(APIViewTestCases.APIViewTestCase):
|
|
|
RouteTarget.objects.bulk_create(route_targets)
|
|
RouteTarget.objects.bulk_create(route_targets)
|
|
|
|
|
|
|
|
|
|
|
|
|
-class RIRTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class RIRTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = RIR
|
|
model = RIR
|
|
|
brief_fields = ['aggregate_count', 'display', 'id', 'name', 'slug', 'url']
|
|
brief_fields = ['aggregate_count', 'display', 'id', 'name', 'slug', 'url']
|
|
|
create_data = [
|
|
create_data = [
|
|
@@ -113,7 +113,7 @@ class RIRTest(APIViewTestCases.APIViewTestCase):
|
|
|
RIR.objects.bulk_create(rirs)
|
|
RIR.objects.bulk_create(rirs)
|
|
|
|
|
|
|
|
|
|
|
|
|
-class AggregateTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class AggregateTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = Aggregate
|
|
model = Aggregate
|
|
|
brief_fields = ['display', 'family', 'id', 'prefix', 'url']
|
|
brief_fields = ['display', 'family', 'id', 'prefix', 'url']
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
@@ -152,7 +152,7 @@ class AggregateTest(APIViewTestCases.APIViewTestCase):
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
-class RoleTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class RoleTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = Role
|
|
model = Role
|
|
|
brief_fields = ['display', 'id', 'name', 'prefix_count', 'slug', 'url', 'vlan_count']
|
|
brief_fields = ['display', 'id', 'name', 'prefix_count', 'slug', 'url', 'vlan_count']
|
|
|
create_data = [
|
|
create_data = [
|
|
@@ -184,7 +184,7 @@ class RoleTest(APIViewTestCases.APIViewTestCase):
|
|
|
Role.objects.bulk_create(roles)
|
|
Role.objects.bulk_create(roles)
|
|
|
|
|
|
|
|
|
|
|
|
|
-class PrefixTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class PrefixTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = Prefix
|
|
model = Prefix
|
|
|
brief_fields = ['_depth', 'display', 'family', 'id', 'prefix', 'url']
|
|
brief_fields = ['_depth', 'display', 'family', 'id', 'prefix', 'url']
|
|
|
create_data = [
|
|
create_data = [
|
|
@@ -358,7 +358,7 @@ class PrefixTest(APIViewTestCases.APIViewTestCase):
|
|
|
self.assertEqual(len(response.data), 8)
|
|
self.assertEqual(len(response.data), 8)
|
|
|
|
|
|
|
|
|
|
|
|
|
-class IPAddressTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class IPAddressTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = IPAddress
|
|
model = IPAddress
|
|
|
brief_fields = ['address', 'display', 'family', 'id', 'url']
|
|
brief_fields = ['address', 'display', 'family', 'id', 'url']
|
|
|
create_data = [
|
|
create_data = [
|
|
@@ -387,7 +387,7 @@ class IPAddressTest(APIViewTestCases.APIViewTestCase):
|
|
|
IPAddress.objects.bulk_create(ip_addresses)
|
|
IPAddress.objects.bulk_create(ip_addresses)
|
|
|
|
|
|
|
|
|
|
|
|
|
-class VLANGroupTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class VLANGroupTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = VLANGroup
|
|
model = VLANGroup
|
|
|
brief_fields = ['display', 'id', 'name', 'slug', 'url', 'vlan_count']
|
|
brief_fields = ['display', 'id', 'name', 'slug', 'url', 'vlan_count']
|
|
|
create_data = [
|
|
create_data = [
|
|
@@ -419,7 +419,7 @@ class VLANGroupTest(APIViewTestCases.APIViewTestCase):
|
|
|
VLANGroup.objects.bulk_create(vlan_groups)
|
|
VLANGroup.objects.bulk_create(vlan_groups)
|
|
|
|
|
|
|
|
|
|
|
|
|
-class VLANTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class VLANTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = VLAN
|
|
model = VLAN
|
|
|
brief_fields = ['display', 'id', 'name', 'url', 'vid']
|
|
brief_fields = ['display', 'id', 'name', 'url', 'vid']
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
@@ -479,7 +479,7 @@ class VLANTest(APIViewTestCases.APIViewTestCase):
|
|
|
self.assertTrue(content['detail'].startswith('Unable to delete object.'))
|
|
self.assertTrue(content['detail'].startswith('Unable to delete object.'))
|
|
|
|
|
|
|
|
|
|
|
|
|
-class ServiceTest(APIViewTestCases.APIViewTestCase):
|
|
|
|
|
|
|
+class ServiceTest(APIViewTestCases.GraphQLTestCase, APIViewTestCases.APIViewTestCase):
|
|
|
model = Service
|
|
model = Service
|
|
|
brief_fields = ['display', 'id', 'name', 'ports', 'protocol', 'url']
|
|
brief_fields = ['display', 'id', 'name', 'ports', 'protocol', 'url']
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|