Enable NetBox-Export integration for 0.3.12-0.3.14 and fix stale tests
The rack width integration only accepted NetBox-Export 0.3.11 and 0.3.14, but the published version was 0.3.13, so the patches were silently skipped. Accept 0.3.12 to 0.3.14; the patcher still checks that all hooked functions exist before patching. Verified on NetBox 4.7.2 that the patch is applied. Update four outdated tests: compare asset versions against __version__ instead of 0.10.4, allow the read-only tenant group lookup in the connection scope test, and check the prefix column in NetBox's table column registry, where register_table_column() stores it. All 174 tests pass on NetBox 4.7.2. Bump version to 0.14.4. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
1ed16c542a
commit
2aab3d14ee
7 files changed
+16
-9
No files matched your search
@@ -5,6 +5,7 @@ from unittest.mock import MagicMock, patch
|
||||
from django.http import HttpResponse
|
||||
from django.test import RequestFactory, SimpleTestCase
|
||||
|
||||
import netbox_utilities
|
||||
from netbox_utilities.topology_views import (
|
||||
_apply_topology_widths_to_device_tags,
|
||||
_inject_topology_widths,
|
||||
@@ -246,7 +247,7 @@ class TopologyViewsRackWidthTest(SimpleTestCase):
|
||||
self.assertIn('id="netbox-utilities-topology-rack-width-styles"', html)
|
||||
self.assertIn('.rack-device[href="/dcim/devices/334/"]', html)
|
||||
self.assertIn("left: calc(50% + 3px) !important", html)
|
||||
self.assertIn("netbox_utilities/topology-rack-width.js?v=0.10.4", html)
|
||||
self.assertIn(f"netbox_utilities/topology-rack-width.js?v={netbox_utilities.__version__}", html)
|
||||
self.assertIn("left:calc(0% + 3px)!important", html)
|
||||
self.assertIn("left:calc(50% + 3px)!important", html)
|
||||
self.assertIn("width:calc(50% - 6px)!important", html)
|
||||
|
||||
Reference in new issue
Block a user