mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-23 12:08:43 -06:00
For #18352, adds choices, model field, migration
Adds: - dcim.choices.PowerOutletStatusChoices - dcim.models.device_components.PowerOutlet.status field with `choices` set to PowerOutletStatusChoices - adds migration for PowerOutlet.status field - updates breaking view tests
This commit is contained in:
@@ -2513,6 +2513,7 @@ class PowerOutletTestCase(ViewTestCases.DeviceComponentViewTestCase):
|
||||
'device': device.pk,
|
||||
'name': 'Power Outlet X',
|
||||
'type': PowerOutletTypeChoices.TYPE_IEC_C13,
|
||||
'status': PowerOutletStatusChoices.STATUS_ENABLED,
|
||||
'power_port': powerports[1].pk,
|
||||
'feed_leg': PowerOutletFeedLegChoices.FEED_LEG_B,
|
||||
'description': 'A power outlet',
|
||||
@@ -2523,6 +2524,7 @@ class PowerOutletTestCase(ViewTestCases.DeviceComponentViewTestCase):
|
||||
'device': device.pk,
|
||||
'name': 'Power Outlet [4-6]',
|
||||
'type': PowerOutletTypeChoices.TYPE_IEC_C13,
|
||||
'status': PowerOutletStatusChoices.STATUS_ENABLED,
|
||||
'power_port': powerports[1].pk,
|
||||
'feed_leg': PowerOutletFeedLegChoices.FEED_LEG_B,
|
||||
'description': 'A power outlet',
|
||||
@@ -2531,6 +2533,7 @@ class PowerOutletTestCase(ViewTestCases.DeviceComponentViewTestCase):
|
||||
|
||||
cls.bulk_edit_data = {
|
||||
'type': PowerOutletTypeChoices.TYPE_IEC_C15,
|
||||
'status': PowerOutletStatusChoices.STATUS_ENABLED,
|
||||
'power_port': powerports[1].pk,
|
||||
'feed_leg': PowerOutletFeedLegChoices.FEED_LEG_B,
|
||||
'description': 'New description',
|
||||
|
||||
Reference in New Issue
Block a user