mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Add tests for DeviceType component bulk edit views
This commit is contained in:
parent
3378287b0c
commit
1b5969a5ee
@ -537,7 +537,6 @@ class ConsolePortTemplateTestCase(StandardTestCases.Views):
|
|||||||
test_create_object = None
|
test_create_object = None
|
||||||
test_delete_object = None
|
test_delete_object = None
|
||||||
test_import_objects = None
|
test_import_objects = None
|
||||||
test_bulk_edit_objects = None
|
|
||||||
|
|
||||||
def test_bulk_create_objects(self):
|
def test_bulk_create_objects(self):
|
||||||
return self._test_bulk_create_objects(expected_count=3)
|
return self._test_bulk_create_objects(expected_count=3)
|
||||||
@ -569,6 +568,10 @@ class ConsolePortTemplateTestCase(StandardTestCases.Views):
|
|||||||
'type': ConsolePortTypeChoices.TYPE_RJ45,
|
'type': ConsolePortTypeChoices.TYPE_RJ45,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cls.bulk_edit_data = {
|
||||||
|
'type': ConsolePortTypeChoices.TYPE_RJ45,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class ConsoleServerPortTemplateTestCase(StandardTestCases.Views):
|
class ConsoleServerPortTemplateTestCase(StandardTestCases.Views):
|
||||||
model = ConsoleServerPortTemplate
|
model = ConsoleServerPortTemplate
|
||||||
@ -579,7 +582,6 @@ class ConsoleServerPortTemplateTestCase(StandardTestCases.Views):
|
|||||||
test_create_object = None
|
test_create_object = None
|
||||||
test_delete_object = None
|
test_delete_object = None
|
||||||
test_import_objects = None
|
test_import_objects = None
|
||||||
test_bulk_edit_objects = None
|
|
||||||
|
|
||||||
def test_bulk_create_objects(self):
|
def test_bulk_create_objects(self):
|
||||||
return self._test_bulk_create_objects(expected_count=3)
|
return self._test_bulk_create_objects(expected_count=3)
|
||||||
@ -611,6 +613,10 @@ class ConsoleServerPortTemplateTestCase(StandardTestCases.Views):
|
|||||||
'type': ConsolePortTypeChoices.TYPE_RJ45,
|
'type': ConsolePortTypeChoices.TYPE_RJ45,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cls.bulk_edit_data = {
|
||||||
|
'type': ConsolePortTypeChoices.TYPE_RJ45,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class PowerPortTemplateTestCase(StandardTestCases.Views):
|
class PowerPortTemplateTestCase(StandardTestCases.Views):
|
||||||
model = PowerPortTemplate
|
model = PowerPortTemplate
|
||||||
@ -621,7 +627,6 @@ class PowerPortTemplateTestCase(StandardTestCases.Views):
|
|||||||
test_create_object = None
|
test_create_object = None
|
||||||
test_delete_object = None
|
test_delete_object = None
|
||||||
test_import_objects = None
|
test_import_objects = None
|
||||||
test_bulk_edit_objects = None
|
|
||||||
|
|
||||||
def test_bulk_create_objects(self):
|
def test_bulk_create_objects(self):
|
||||||
return self._test_bulk_create_objects(expected_count=3)
|
return self._test_bulk_create_objects(expected_count=3)
|
||||||
@ -645,7 +650,7 @@ class PowerPortTemplateTestCase(StandardTestCases.Views):
|
|||||||
'device_type': devicetypes[1].pk,
|
'device_type': devicetypes[1].pk,
|
||||||
'name': 'Power Port Template X',
|
'name': 'Power Port Template X',
|
||||||
'type': PowerPortTypeChoices.TYPE_IEC_C14,
|
'type': PowerPortTypeChoices.TYPE_IEC_C14,
|
||||||
'maxiumum_draw': 100,
|
'maximum_draw': 100,
|
||||||
'allocated_draw': 50,
|
'allocated_draw': 50,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -653,7 +658,13 @@ class PowerPortTemplateTestCase(StandardTestCases.Views):
|
|||||||
'device_type': devicetypes[1].pk,
|
'device_type': devicetypes[1].pk,
|
||||||
'name_pattern': 'Power Port Template [4-6]',
|
'name_pattern': 'Power Port Template [4-6]',
|
||||||
'type': PowerPortTypeChoices.TYPE_IEC_C14,
|
'type': PowerPortTypeChoices.TYPE_IEC_C14,
|
||||||
'maxiumum_draw': 100,
|
'maximum_draw': 100,
|
||||||
|
'allocated_draw': 50,
|
||||||
|
}
|
||||||
|
|
||||||
|
cls.bulk_edit_data = {
|
||||||
|
'type': PowerPortTypeChoices.TYPE_IEC_C14,
|
||||||
|
'maximum_draw': 100,
|
||||||
'allocated_draw': 50,
|
'allocated_draw': 50,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -667,7 +678,6 @@ class PowerOutletTemplateTestCase(StandardTestCases.Views):
|
|||||||
test_create_object = None
|
test_create_object = None
|
||||||
test_delete_object = None
|
test_delete_object = None
|
||||||
test_import_objects = None
|
test_import_objects = None
|
||||||
test_bulk_edit_objects = None
|
|
||||||
|
|
||||||
def test_bulk_create_objects(self):
|
def test_bulk_create_objects(self):
|
||||||
return self._test_bulk_create_objects(expected_count=3)
|
return self._test_bulk_create_objects(expected_count=3)
|
||||||
@ -704,6 +714,11 @@ class PowerOutletTemplateTestCase(StandardTestCases.Views):
|
|||||||
'feed_leg': PowerOutletFeedLegChoices.FEED_LEG_B,
|
'feed_leg': PowerOutletFeedLegChoices.FEED_LEG_B,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cls.bulk_edit_data = {
|
||||||
|
'type': PowerOutletTypeChoices.TYPE_IEC_C13,
|
||||||
|
'feed_leg': PowerOutletFeedLegChoices.FEED_LEG_B,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class InterfaceTemplateTestCase(StandardTestCases.Views):
|
class InterfaceTemplateTestCase(StandardTestCases.Views):
|
||||||
model = InterfaceTemplate
|
model = InterfaceTemplate
|
||||||
@ -762,7 +777,6 @@ class FrontPortTemplateTestCase(StandardTestCases.Views):
|
|||||||
test_create_object = None
|
test_create_object = None
|
||||||
test_delete_object = None
|
test_delete_object = None
|
||||||
test_import_objects = None
|
test_import_objects = None
|
||||||
test_bulk_edit_objects = None
|
|
||||||
|
|
||||||
def test_bulk_create_objects(self):
|
def test_bulk_create_objects(self):
|
||||||
return self._test_bulk_create_objects(expected_count=3)
|
return self._test_bulk_create_objects(expected_count=3)
|
||||||
@ -805,6 +819,10 @@ class FrontPortTemplateTestCase(StandardTestCases.Views):
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cls.bulk_edit_data = {
|
||||||
|
'type': PortTypeChoices.TYPE_8P8C,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class RearPortTemplateTestCase(StandardTestCases.Views):
|
class RearPortTemplateTestCase(StandardTestCases.Views):
|
||||||
model = RearPortTemplate
|
model = RearPortTemplate
|
||||||
@ -815,7 +833,6 @@ class RearPortTemplateTestCase(StandardTestCases.Views):
|
|||||||
test_create_object = None
|
test_create_object = None
|
||||||
test_delete_object = None
|
test_delete_object = None
|
||||||
test_import_objects = None
|
test_import_objects = None
|
||||||
test_bulk_edit_objects = None
|
|
||||||
|
|
||||||
def test_bulk_create_objects(self):
|
def test_bulk_create_objects(self):
|
||||||
return self._test_bulk_create_objects(expected_count=3)
|
return self._test_bulk_create_objects(expected_count=3)
|
||||||
@ -849,6 +866,10 @@ class RearPortTemplateTestCase(StandardTestCases.Views):
|
|||||||
'positions': 2,
|
'positions': 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cls.bulk_edit_data = {
|
||||||
|
'type': PortTypeChoices.TYPE_8P8C,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class DeviceBayTemplateTestCase(StandardTestCases.Views):
|
class DeviceBayTemplateTestCase(StandardTestCases.Views):
|
||||||
model = DeviceBayTemplate
|
model = DeviceBayTemplate
|
||||||
|
Loading…
Reference in New Issue
Block a user