|
@@ -23,6 +23,9 @@ class ProviderTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'comments': 'New comments',
|
|
'comments': 'New comments',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'owner': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -79,6 +82,9 @@ class CircuitTypeTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'color': 'not-a-color',
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -97,6 +103,9 @@ class CircuitTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'status': 'planned',
|
|
'status': 'planned',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'status': 'not-a-valid-status',
|
|
|
|
|
+ }
|
|
|
user_permissions = ('circuits.view_provider', 'circuits.view_circuittype')
|
|
user_permissions = ('circuits.view_provider', 'circuits.view_circuittype')
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
@@ -215,6 +224,9 @@ class CircuitTerminationTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
cls.bulk_update_data = {
|
|
cls.bulk_update_data = {
|
|
|
'port_speed': 123456
|
|
'port_speed': 123456
|
|
|
}
|
|
}
|
|
|
|
|
+ cls.bulk_update_invalid_data = {
|
|
|
|
|
+ 'term_side': 'not-a-valid-term-side',
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
class CircuitGroupTestCase(APIViewTestCases.APIViewTestCase):
|
|
class CircuitGroupTestCase(APIViewTestCases.APIViewTestCase):
|
|
@@ -223,6 +235,9 @@ class CircuitGroupTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'tenant': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -291,6 +306,9 @@ class ProviderAccountTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
'provider': providers[1].pk,
|
|
'provider': providers[1].pk,
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ cls.bulk_update_invalid_data = {
|
|
|
|
|
+ 'provider': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
class CircuitGroupAssignmentTestCase(APIViewTestCases.APIViewTestCase):
|
|
class CircuitGroupAssignmentTestCase(APIViewTestCases.APIViewTestCase):
|
|
@@ -299,6 +317,9 @@ class CircuitGroupAssignmentTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'priority': CircuitPriorityChoices.PRIORITY_INACTIVE,
|
|
'priority': CircuitPriorityChoices.PRIORITY_INACTIVE,
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'priority': 'not-a-valid-priority',
|
|
|
|
|
+ }
|
|
|
user_permissions = ('circuits.view_circuit', 'circuits.view_circuitgroup')
|
|
user_permissions = ('circuits.view_circuit', 'circuits.view_circuitgroup')
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
@@ -407,6 +428,9 @@ class ProviderNetworkTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
'provider': providers[1].pk,
|
|
'provider': providers[1].pk,
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ cls.bulk_update_invalid_data = {
|
|
|
|
|
+ 'provider': 99999,
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
class VirtualCircuitTypeTestCase(APIViewTestCases.APIViewTestCase):
|
|
class VirtualCircuitTypeTestCase(APIViewTestCases.APIViewTestCase):
|
|
@@ -429,6 +453,9 @@ class VirtualCircuitTypeTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'color': 'not-a-color',
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -447,6 +474,9 @@ class VirtualCircuitTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'status': 'planned',
|
|
'status': 'planned',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'status': 'not-a-valid-status',
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|
|
@@ -511,6 +541,9 @@ class VirtualCircuitTerminationTestCase(APIViewTestCases.APIViewTestCase):
|
|
|
bulk_update_data = {
|
|
bulk_update_data = {
|
|
|
'description': 'New description',
|
|
'description': 'New description',
|
|
|
}
|
|
}
|
|
|
|
|
+ bulk_update_invalid_data = {
|
|
|
|
|
+ 'role': 'not-a-valid-role',
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
|
def setUpTestData(cls):
|
|
def setUpTestData(cls):
|