diff --git a/netbox/utilities/tests/test_forms.py b/netbox/utilities/tests/test_forms.py index 0a4ecb795..999e7290d 100644 --- a/netbox/utilities/tests/test_forms.py +++ b/netbox/utilities/tests/test_forms.py @@ -269,8 +269,11 @@ class ExpandAlphanumeric(TestCase): sorted(expand_alphanumeric_pattern('r[8--9]a')) def test_invalid_range_alphanumeric(self): - self.assertEqual(sorted(expand_alphanumeric_pattern('r[9-a]a')), []) - self.assertEqual(sorted(expand_alphanumeric_pattern('r[a-9]a')), []) + with self.assertRaises(forms.ValidationError): + sorted(expand_alphanumeric_pattern('r[9-a]a')) + + with self.assertRaises(forms.ValidationError): + sorted(expand_alphanumeric_pattern('r[a-9]a')) def test_invalid_range_bounds(self): with self.assertRaises(forms.ValidationError):