mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Update exempted tests
This commit is contained in:
parent
77a49fa40e
commit
635fefcb5c
@ -794,7 +794,9 @@ class DeviceBayTemplateTestCase(ViewTestCases.DeviceComponentTemplateViewTestCas
|
|||||||
model = DeviceBayTemplate
|
model = DeviceBayTemplate
|
||||||
|
|
||||||
# Disable inapplicable views
|
# Disable inapplicable views
|
||||||
test_bulk_edit_objects = None
|
test_bulk_edit_objects_without_permission = None
|
||||||
|
test_bulk_edit_objects_with_model_permission = None
|
||||||
|
test_bulk_edit_objects_with_object_permission = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpTestData(cls):
|
def setUpTestData(cls):
|
||||||
@ -1439,7 +1441,9 @@ class CableTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
|||||||
model = Cable
|
model = Cable
|
||||||
|
|
||||||
# TODO: Creation URL needs termination context
|
# TODO: Creation URL needs termination context
|
||||||
test_create_object = None
|
test_create_object_without_permission = None
|
||||||
|
test_create_object_with_model_permission = None
|
||||||
|
test_create_object_with_object_permission = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpTestData(cls):
|
def setUpTestData(cls):
|
||||||
@ -1513,11 +1517,17 @@ class VirtualChassisTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
|||||||
model = VirtualChassis
|
model = VirtualChassis
|
||||||
|
|
||||||
# Disable inapplicable tests
|
# Disable inapplicable tests
|
||||||
test_import_objects = None
|
test_bulk_import_objects_without_permission = None
|
||||||
|
test_bulk_import_objects_with_model_permission = None
|
||||||
|
test_bulk_import_objects_with_object_permission = None
|
||||||
|
|
||||||
# TODO: Requires special form handling
|
# TODO: Requires special form handling
|
||||||
test_create_object = None
|
test_create_object_without_permission = None
|
||||||
test_edit_object = None
|
test_create_object_with_model_permission = None
|
||||||
|
test_create_object_with_object_permission = None
|
||||||
|
test_edit_object_without_permission = None
|
||||||
|
test_edit_object_with_model_permission = None
|
||||||
|
test_edit_object_with_object_permission = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpTestData(cls):
|
def setUpTestData(cls):
|
||||||
|
@ -14,8 +14,12 @@ class TagTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
|||||||
model = Tag
|
model = Tag
|
||||||
|
|
||||||
# Disable inapplicable tests
|
# Disable inapplicable tests
|
||||||
test_create_object = None
|
test_create_object_without_permission = None
|
||||||
test_import_objects = None
|
test_create_object_with_model_permission = None
|
||||||
|
test_create_object_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
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpTestData(cls):
|
def setUpTestData(cls):
|
||||||
@ -42,11 +46,17 @@ class ConfigContextTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
|||||||
model = ConfigContext
|
model = ConfigContext
|
||||||
|
|
||||||
# Disable inapplicable tests
|
# Disable inapplicable tests
|
||||||
test_import_objects = None
|
test_bulk_import_objects_without_permission = None
|
||||||
|
test_bulk_import_objects_with_model_permission = None
|
||||||
|
test_bulk_import_objects_with_object_permission = None
|
||||||
|
|
||||||
# TODO: Resolve model discrepancies when creating/editing ConfigContexts
|
# TODO: Resolve model discrepancies when creating/editing ConfigContexts
|
||||||
test_create_object = None
|
test_create_object_without_permission = None
|
||||||
test_edit_object = None
|
test_create_object_with_model_permission = None
|
||||||
|
test_create_object_with_object_permission = None
|
||||||
|
test_edit_object_without_permission = None
|
||||||
|
test_edit_object_with_model_permission = None
|
||||||
|
test_edit_object_with_object_permission = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpTestData(cls):
|
def setUpTestData(cls):
|
||||||
|
@ -337,7 +337,9 @@ class ServiceTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
|||||||
model = Service
|
model = Service
|
||||||
|
|
||||||
# TODO: Resolve URL for Service creation
|
# TODO: Resolve URL for Service creation
|
||||||
test_create_object = None
|
test_create_object_without_permission = None
|
||||||
|
test_create_object_with_model_permission = None
|
||||||
|
test_create_object_with_object_permission = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpTestData(cls):
|
def setUpTestData(cls):
|
||||||
|
@ -40,10 +40,14 @@ class SecretTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
|||||||
model = Secret
|
model = Secret
|
||||||
|
|
||||||
# Disable inapplicable tests
|
# Disable inapplicable tests
|
||||||
test_create_object = None
|
test_create_object_without_permission = None
|
||||||
|
test_create_object_with_model_permission = None
|
||||||
|
test_create_object_with_object_permission = None
|
||||||
|
|
||||||
# TODO: Check permissions enforcement on secrets.views.secret_edit
|
# TODO: Check permissions enforcement on secrets.views.secret_edit
|
||||||
test_edit_object = None
|
test_edit_object_without_permission = None
|
||||||
|
test_edit_object_with_model_permission = None
|
||||||
|
test_edit_object_with_object_permission = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpTestData(cls):
|
def setUpTestData(cls):
|
||||||
|
@ -351,7 +351,7 @@ class ViewTestCases:
|
|||||||
|
|
||||||
# Try GET without permission
|
# Try GET without permission
|
||||||
with disable_warnings('django.request'):
|
with disable_warnings('django.request'):
|
||||||
self.assertHttpStatus(self.client.get(instance.get_absolute_url()), 403)
|
self.assertHttpStatus(self.client.get(self._get_url('delete', instance)), 403)
|
||||||
|
|
||||||
# Try POST without permission
|
# Try POST without permission
|
||||||
request = {
|
request = {
|
||||||
|
@ -192,8 +192,12 @@ class InterfaceTestCase(
|
|||||||
model = Interface
|
model = Interface
|
||||||
|
|
||||||
# Disable inapplicable tests
|
# Disable inapplicable tests
|
||||||
test_list_objects = None
|
test_list_objects_without_permission = None
|
||||||
test_import_objects = 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):
|
def _get_base_url(self):
|
||||||
# Interface belongs to the DCIM app, so we have to override the base URL
|
# Interface belongs to the DCIM app, so we have to override the base URL
|
||||||
|
Loading…
Reference in New Issue
Block a user