mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Standardize base classes for view test cases
This commit is contained in:
@@ -185,21 +185,17 @@ class VirtualMachineTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
||||
}
|
||||
|
||||
|
||||
# TODO: Update base class to DeviceComponentViewTestCase
|
||||
class InterfaceTestCase(
|
||||
ViewTestCases.GetObjectViewTestCase,
|
||||
ViewTestCases.DeviceComponentViewTestCase,
|
||||
ViewTestCases.EditObjectViewTestCase,
|
||||
ViewTestCases.DeleteObjectViewTestCase,
|
||||
ViewTestCases.BulkCreateObjectsViewTestCase,
|
||||
ViewTestCases.BulkEditObjectsViewTestCase,
|
||||
ViewTestCases.BulkDeleteObjectsViewTestCase,
|
||||
):
|
||||
model = Interface
|
||||
|
||||
# Disable inapplicable tests
|
||||
test_list_objects_anonymous = None
|
||||
test_list_objects_without_permission = None
|
||||
test_list_objects_with_model_permission = None
|
||||
test_list_objects_with_object_permission = None
|
||||
test_bulk_import_objects_without_permission = None
|
||||
test_bulk_import_objects_with_model_permission = None
|
||||
test_bulk_import_objects_with_object_permission = None
|
||||
|
||||
def _get_base_url(self):
|
||||
# Interface belongs to the DCIM app, so we have to override the base URL
|
||||
return 'virtualization:interface_{}'
|
||||
|
Reference in New Issue
Block a user