1
0
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:
Jeremy Stretch
2020-05-28 12:05:54 -04:00
parent 5d36d81ae1
commit 486f1a74ab
5 changed files with 76 additions and 77 deletions

View File

@@ -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_{}'