mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' into develop-2.8
This commit is contained in:
@@ -1336,37 +1336,37 @@ class RearPortTestCase(ViewTestCases.DeviceComponentViewTestCase):
|
||||
class DeviceBayTestCase(ViewTestCases.DeviceComponentViewTestCase):
|
||||
model = DeviceBay
|
||||
|
||||
# Disable inapplicable views
|
||||
test_bulk_edit_objects = None
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
device1 = create_test_device('Device 1')
|
||||
device2 = create_test_device('Device 2')
|
||||
device = create_test_device('Device 1')
|
||||
|
||||
# Update the DeviceType subdevice role to allow adding DeviceBays
|
||||
DeviceType.objects.update(subdevice_role=SubdeviceRoleChoices.ROLE_PARENT)
|
||||
|
||||
DeviceBay.objects.bulk_create([
|
||||
DeviceBay(device=device1, name='Device Bay 1'),
|
||||
DeviceBay(device=device1, name='Device Bay 2'),
|
||||
DeviceBay(device=device1, name='Device Bay 3'),
|
||||
DeviceBay(device=device, name='Device Bay 1'),
|
||||
DeviceBay(device=device, name='Device Bay 2'),
|
||||
DeviceBay(device=device, name='Device Bay 3'),
|
||||
])
|
||||
|
||||
cls.form_data = {
|
||||
'device': device2.pk,
|
||||
'device': device.pk,
|
||||
'name': 'Device Bay X',
|
||||
'description': 'A device bay',
|
||||
'tags': 'Alpha,Bravo,Charlie',
|
||||
}
|
||||
|
||||
cls.bulk_create_data = {
|
||||
'device': device2.pk,
|
||||
'device': device.pk,
|
||||
'name_pattern': 'Device Bay [4-6]',
|
||||
'description': 'A device bay',
|
||||
'tags': 'Alpha,Bravo,Charlie',
|
||||
}
|
||||
|
||||
cls.bulk_edit_data = {
|
||||
'description': 'New description',
|
||||
}
|
||||
|
||||
cls.csv_data = (
|
||||
"device,name",
|
||||
"Device 1,Device Bay 4",
|
||||
|
Reference in New Issue
Block a user