mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-23 12:08:43 -06:00
18417 Add outer_height to racks (#18940)
* 18417 add rack outer height * 18417 add rack outer height * 18417 fix tests * 18417 fix validation message * Update netbox/dcim/filtersets.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update netbox/dcim/filtersets.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update netbox/dcim/models/racks.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update netbox/dcim/models/racks.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update netbox/dcim/models/racks.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update netbox/dcim/models/racks.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * 16224 review changes * 16224 review changes * 16224 update table display * 18417 use TemplateColumn * 18417 review changes --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@@ -585,6 +585,7 @@ class RackTypeTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
starting_unit=1,
|
||||
desc_units=False,
|
||||
outer_width=100,
|
||||
outer_height=100,
|
||||
outer_depth=100,
|
||||
outer_unit=RackDimensionUnitChoices.UNIT_MILLIMETER,
|
||||
mounting_depth=100,
|
||||
@@ -603,6 +604,7 @@ class RackTypeTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
starting_unit=2,
|
||||
desc_units=False,
|
||||
outer_width=200,
|
||||
outer_height=200,
|
||||
outer_depth=200,
|
||||
outer_unit=RackDimensionUnitChoices.UNIT_MILLIMETER,
|
||||
mounting_depth=200,
|
||||
@@ -621,6 +623,7 @@ class RackTypeTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
starting_unit=3,
|
||||
desc_units=True,
|
||||
outer_width=300,
|
||||
outer_height=300,
|
||||
outer_depth=300,
|
||||
outer_unit=RackDimensionUnitChoices.UNIT_INCH,
|
||||
mounting_depth=300,
|
||||
@@ -681,6 +684,10 @@ class RackTypeTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
params = {'outer_width': [100, 200]}
|
||||
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
||||
|
||||
def test_outer_height(self):
|
||||
params = {'outer_height': [100, 200]}
|
||||
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
||||
|
||||
def test_outer_depth(self):
|
||||
params = {'outer_depth': [100, 200]}
|
||||
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
||||
@@ -764,6 +771,7 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
starting_unit=1,
|
||||
desc_units=False,
|
||||
outer_width=100,
|
||||
outer_height=100,
|
||||
outer_depth=100,
|
||||
outer_unit=RackDimensionUnitChoices.UNIT_MILLIMETER,
|
||||
mounting_depth=100,
|
||||
@@ -782,6 +790,7 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
starting_unit=2,
|
||||
desc_units=False,
|
||||
outer_width=200,
|
||||
outer_height=200,
|
||||
outer_depth=200,
|
||||
outer_unit=RackDimensionUnitChoices.UNIT_MILLIMETER,
|
||||
mounting_depth=200,
|
||||
@@ -831,6 +840,7 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
u_height=42,
|
||||
desc_units=False,
|
||||
outer_width=100,
|
||||
outer_height=100,
|
||||
outer_depth=100,
|
||||
outer_unit=RackDimensionUnitChoices.UNIT_MILLIMETER,
|
||||
weight=10,
|
||||
@@ -854,6 +864,7 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
u_height=43,
|
||||
desc_units=False,
|
||||
outer_width=200,
|
||||
outer_height=200,
|
||||
outer_depth=200,
|
||||
outer_unit=RackDimensionUnitChoices.UNIT_MILLIMETER,
|
||||
weight=20,
|
||||
@@ -877,6 +888,7 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
u_height=44,
|
||||
desc_units=True,
|
||||
outer_width=300,
|
||||
outer_height=300,
|
||||
outer_depth=300,
|
||||
outer_unit=RackDimensionUnitChoices.UNIT_INCH,
|
||||
weight=30,
|
||||
@@ -957,6 +969,10 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
|
||||
params = {'outer_width': [100, 200]}
|
||||
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
||||
|
||||
def test_outer_height(self):
|
||||
params = {'outer_height': [100, 200]}
|
||||
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
||||
|
||||
def test_outer_depth(self):
|
||||
params = {'outer_depth': [100, 200]}
|
||||
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
||||
|
||||
Reference in New Issue
Block a user