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:
MrBlakeandClaude Opus 5.5 committed 2026-10-13 15:08:43 +02:00
1 parent 1ed16c542a
commit 2aab3d14ee
7 files changed
+16 -9

No files matched your search

+6 -4
View File
@@ -72,11 +72,13 @@ class SitePrefixTest(SimpleTestCase):
def test_device_and_rack_tables_offer_prefix_column(self):
from dcim.tables import DeviceTable, RackTable
self.assertIn(COLUMN_NAME, DeviceTable.base_columns)
self.assertIn(COLUMN_NAME, RackTable.base_columns)
from netbox.registry import registry
# register_table_column() stores columns in the registry; NetBox adds them when a table is instantiated.
for table in (DeviceTable, RackTable):
column = table.base_columns[COLUMN_NAME]
self.assertTrue(column.orderable)
self.assertIn(COLUMN_NAME, registry["tables"][table])
column = registry["tables"][table][COLUMN_NAME]
self.assertIsNot(column.orderable, False) # None means the table default (sortable)
self.assertEqual(tuple(column.order_by), ("site__name",))
self.assertEqual(DeviceTable.Meta.default_columns[:2], ("pk", COLUMN_NAME))
self.assertEqual(RackTable.Meta.default_columns[:2], ("pk", COLUMN_NAME))