Skip to content

Commit e2279f6

Browse files
committed
chore(tests): Align ACL bulk update with changelog checks
Switch bulk update field from default_action to comments in AccessList API tests so the bulk update produces three changelog entries as expected by NetBox v4.4’s API test case. Improves accuracy of changelog comparison.
1 parent 1729f95 commit e2279f6

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

netbox_acls/tests/api/test_access_list_rules.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
from utilities.testing import APIViewTestCases
44
from virtualization.models import Cluster, ClusterType, VirtualMachine
55

6-
from netbox_acls.choices import *
7-
from netbox_acls.models import *
6+
from netbox_acls.choices import (
7+
ACLActionChoices,
8+
ACLProtocolChoices,
9+
ACLRuleActionChoices,
10+
ACLTypeChoices,
11+
)
12+
from netbox_acls.models import AccessList, ACLExtendedRule, ACLStandardRule
813

914

1015
class ACLStandardRuleAPIViewTestCase(APIViewTestCases.APIViewTestCase):

netbox_acls/tests/api/test_access_lists.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
from utilities.testing import APIViewTestCases
55
from virtualization.models import Cluster, ClusterType, VirtualMachine, VMInterface
66

7-
from netbox_acls.choices import *
8-
from netbox_acls.models import *
7+
from netbox_acls.choices import (
8+
ACLActionChoices,
9+
ACLAssignmentDirectionChoices,
10+
ACLTypeChoices,
11+
)
12+
from netbox_acls.models import AccessList, ACLInterfaceAssignment
913

1014

1115
class AccessListAPIViewTestCase(APIViewTestCases.APIViewTestCase):
@@ -116,7 +120,7 @@ def setUpTestData(cls):
116120
},
117121
]
118122
cls.bulk_update_data = {
119-
"default_action": ACLActionChoices.ACTION_PERMIT,
123+
"comments": "Rule bulk update",
120124
}
121125

122126

0 commit comments

Comments
 (0)