17058 fix tests

This commit is contained in:
Arthur Hanson 2024-08-01 15:39:29 +07:00
parent 6b9d1ddb93
commit d18b739ac3
4 changed files with 4 additions and 5 deletions

View File

@ -319,7 +319,7 @@ class RackTypeFilterSet(NetBoxModelFilterSet):
if not value.strip():
return queryset
return queryset.filter(
Q(name__icontains=value) |
Q(model__icontains=value) |
Q(description__icontains=value) |
Q(comments__icontains=value)
)

View File

@ -613,7 +613,6 @@ class PowerPortTemplateType(ModularComponentTemplateType):
filters=RackTypeFilter
)
class RackTypeType(NetBoxObjectType):
_name: str
manufacturer: Annotated["ManufacturerType", strawberry.lazy('dcim.graphql.types')]

View File

@ -663,7 +663,7 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
rack_types = (
RackType(
manufacturer=manufacturers[0],
name='RackType 1',
model='RackType 1',
slug='rack-type-1',
form_factor=RackFormFactorChoices.TYPE_2POST,
width=RackWidthChoices.WIDTH_19IN,
@ -681,7 +681,7 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
),
RackType(
manufacturer=manufacturers[1],
name='RackType 2',
model='RackType 2',
slug='rack-type-2',
form_factor=RackFormFactorChoices.TYPE_4POST,
width=RackWidthChoices.WIDTH_21IN,

View File

@ -82,7 +82,7 @@ class RackTypeTestCase(TestCase):
RackType.objects.create(
manufacturer=manufacturer,
name='RackType 1',
model='RackType 1',
slug='rack-type-1',
width=11,
u_height=22,