From 240ab4e44fbd94a6e30769335e46f04262f34328 Mon Sep 17 00:00:00 2001 From: Brian Tiemann Date: Wed, 18 Sep 2024 16:58:46 -0400 Subject: [PATCH] Fix tests --- netbox/dcim/tests/test_filtersets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/tests/test_filtersets.py b/netbox/dcim/tests/test_filtersets.py index 26c8f30c3..ff83f1e35 100644 --- a/netbox/dcim/tests/test_filtersets.py +++ b/netbox/dcim/tests/test_filtersets.py @@ -1,4 +1,5 @@ from django.test import TestCase +from django.conf import settings from circuits.models import Circuit, CircuitTermination, CircuitType, Provider from dcim.choices import * @@ -5240,7 +5241,7 @@ class CableTestCase(TestCase, ChangeLoggedFilterSetTests): def test_type(self): params = {'type': [CableTypeChoices.TYPE_CAT3, CableTypeChoices.TYPE_CAT5E]} self.assertEqual(self.filterset(params, self.queryset).qs.count(), 4) - params = {'type': [CableTypeChoices.TYPE_EMPTY]} + params = {'type': [settings.FILTERS_NULL_CHOICE_VALUE]} params = {'type__empty': 'true'} self.assertEqual(self.filterset(params, self.queryset).qs.count(), 8) params = {'type__empty': 'false'} @@ -5249,7 +5250,7 @@ class CableTestCase(TestCase, ChangeLoggedFilterSetTests): def test_type_empty(self): params = {'type__empty': 'true'} self.assertEqual(self.filterset(params, self.queryset).qs.count(), 8) - params = {'type': [CableTypeChoices.TYPE_EMPTY, CableTypeChoices.TYPE_CAT3]} + params = {'type': [settings.FILTERS_NULL_CHOICE_VALUE, CableTypeChoices.TYPE_CAT3]} self.assertEqual(self.filterset(params, self.queryset).qs.count(), 10) def test_status(self):