|
@@ -30,6 +30,9 @@ class ASNRangeTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -142,6 +145,9 @@ class ASNTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -220,6 +226,9 @@ class VRFTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -263,6 +272,9 @@ class RouteTargetTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -295,6 +307,9 @@ class RIRTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -313,6 +328,9 @@ class AggregateTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'rir': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -415,6 +433,9 @@ class RoleTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -455,6 +476,9 @@ class PrefixTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'status': 'not-a-valid-status',
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -754,6 +778,9 @@ class IPRangeTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'status': 'not-a-valid-status',
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -909,6 +936,9 @@ class IPAddressTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'status': 'not-a-valid-status',
|
|
|
|
|
+ }
|
|
|
graphql_filter = {
|
|
graphql_filter = {
|
|
|
'address': {'lookup': 'i_exact', 'value': '192.168.0.1/24'},
|
|
'address': {'lookup': 'i_exact', 'value': '192.168.0.1/24'},
|
|
|
}
|
|
}
|
|
@@ -1071,6 +1101,9 @@ class FHRPGroupTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
'name': 'foobar-999',
|
|
'name': 'foobar-999',
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'protocol': 'not-a-valid-protocol',
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -1117,6 +1150,9 @@ class FHRPGroupAssignmentTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'priority': 100,
|
|
'priority': 100,
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'group': 99999,
|
|
|
|
|
+ }
|
|
|
user_permissions = ('ipam.view_fhrpgroup', )
|
|
user_permissions = ('ipam.view_fhrpgroup', )
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
@@ -1214,6 +1250,9 @@ class VLANGroupTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -1320,6 +1359,9 @@ class VLANTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'status': 'not-a-valid-status',
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -1387,6 +1429,9 @@ class VLANTranslationPolicyTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -1523,6 +1568,9 @@ class VLANTranslationRuleTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
'policy': vlan_translation_policies[2].pk,
|
|
'policy': vlan_translation_policies[2].pk,
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ cls.bulk_update_invalid_data = {
|
|
|
|
|
+ 'policy': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
def test_standard_fields_in_representation(self):
|
|
def test_standard_fields_in_representation(self):
|
|
|
"""The standard URL, tag, custom-field and change-tracking names appear in the representation."""
|
|
"""The standard URL, tag, custom-field and change-tracking names appear in the representation."""
|
|
@@ -1554,6 +1602,9 @@ class ServiceTemplateTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
graphql_base_name = 'service_template'
|
|
graphql_base_name = 'service_template'
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
@@ -1838,6 +1889,9 @@ class ServiceTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
graphql_base_name = 'service'
|
|
graphql_base_name = 'service'
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|