mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 08:38:16 -06:00
17058 fix tests
This commit is contained in:
parent
6b9d1ddb93
commit
d18b739ac3
@ -319,7 +319,7 @@ class RackTypeFilterSet(NetBoxModelFilterSet):
|
|||||||
if not value.strip():
|
if not value.strip():
|
||||||
return queryset
|
return queryset
|
||||||
return queryset.filter(
|
return queryset.filter(
|
||||||
Q(name__icontains=value) |
|
Q(model__icontains=value) |
|
||||||
Q(description__icontains=value) |
|
Q(description__icontains=value) |
|
||||||
Q(comments__icontains=value)
|
Q(comments__icontains=value)
|
||||||
)
|
)
|
||||||
|
@ -613,7 +613,6 @@ class PowerPortTemplateType(ModularComponentTemplateType):
|
|||||||
filters=RackTypeFilter
|
filters=RackTypeFilter
|
||||||
)
|
)
|
||||||
class RackTypeType(NetBoxObjectType):
|
class RackTypeType(NetBoxObjectType):
|
||||||
_name: str
|
|
||||||
manufacturer: Annotated["ManufacturerType", strawberry.lazy('dcim.graphql.types')]
|
manufacturer: Annotated["ManufacturerType", strawberry.lazy('dcim.graphql.types')]
|
||||||
|
|
||||||
|
|
||||||
|
@ -663,7 +663,7 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
|
|||||||
rack_types = (
|
rack_types = (
|
||||||
RackType(
|
RackType(
|
||||||
manufacturer=manufacturers[0],
|
manufacturer=manufacturers[0],
|
||||||
name='RackType 1',
|
model='RackType 1',
|
||||||
slug='rack-type-1',
|
slug='rack-type-1',
|
||||||
form_factor=RackFormFactorChoices.TYPE_2POST,
|
form_factor=RackFormFactorChoices.TYPE_2POST,
|
||||||
width=RackWidthChoices.WIDTH_19IN,
|
width=RackWidthChoices.WIDTH_19IN,
|
||||||
@ -681,7 +681,7 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
|
|||||||
),
|
),
|
||||||
RackType(
|
RackType(
|
||||||
manufacturer=manufacturers[1],
|
manufacturer=manufacturers[1],
|
||||||
name='RackType 2',
|
model='RackType 2',
|
||||||
slug='rack-type-2',
|
slug='rack-type-2',
|
||||||
form_factor=RackFormFactorChoices.TYPE_4POST,
|
form_factor=RackFormFactorChoices.TYPE_4POST,
|
||||||
width=RackWidthChoices.WIDTH_21IN,
|
width=RackWidthChoices.WIDTH_21IN,
|
||||||
|
@ -82,7 +82,7 @@ class RackTypeTestCase(TestCase):
|
|||||||
|
|
||||||
RackType.objects.create(
|
RackType.objects.create(
|
||||||
manufacturer=manufacturer,
|
manufacturer=manufacturer,
|
||||||
name='RackType 1',
|
model='RackType 1',
|
||||||
slug='rack-type-1',
|
slug='rack-type-1',
|
||||||
width=11,
|
width=11,
|
||||||
u_height=22,
|
u_height=22,
|
||||||
|
Loading…
Reference in New Issue
Block a user