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