Skip to content

Commit 74c362d

Browse files
committed
chore(tests): move model tests to dedicated directory
Renames `test_models.py` to `models/test_accesslists.py` to improve test organization and maintainability. This is a structural change with no modifications to test logic.
1 parent c7fedaa commit 74c362d

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

netbox_acls/tests/models/__init__.py

Whitespace-only changes.

netbox_acls/tests/test_models.py renamed to netbox_acls/tests/models/test_accesslists.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,11 @@ def test_valid_acl_choices(self):
178178
valid_acl_default_action_choices = ["permit", "deny"]
179179
valid_acl_types = ["standard", "extended"]
180180
if len(valid_acl_default_action_choices) > len(valid_acl_types):
181-
valid_acl_choices = list(
182-
zip(valid_acl_default_action_choices, cycle(valid_acl_types))
183-
)
181+
valid_acl_choices = list(zip(valid_acl_default_action_choices, cycle(valid_acl_types)))
184182
elif len(valid_acl_default_action_choices) < len(valid_acl_types):
185-
valid_acl_choices = list(
186-
zip(cycle(valid_acl_default_action_choices), valid_acl_types)
187-
)
183+
valid_acl_choices = list(zip(cycle(valid_acl_default_action_choices), valid_acl_types))
188184
else:
189-
valid_acl_choices = list(
190-
zip(valid_acl_default_action_choices, valid_acl_types)
191-
)
185+
valid_acl_choices = list(zip(valid_acl_default_action_choices, valid_acl_types))
192186

193187
for default_action, acl_type in valid_acl_choices:
194188
valid_acl_choice = AccessList(
@@ -257,12 +251,12 @@ def setUpTestData(cls):
257251
VMInterface(name="Interface 2", virtual_machine=virtual_machine),
258252
)
259253
)
260-
#prefixes = Prefix.objects.bulk_create(
254+
# prefixes = Prefix.objects.bulk_create(
261255
# (
262256
# Prefix(prefix=IPNetwork("10.0.0.0/24")),
263257
# Prefix(prefix=IPNetwork("192.168.1.0/24")),
264258
# )
265-
#)
259+
# )
266260

267261
def test_acl_interface_assignment_success(self):
268262
"""

0 commit comments

Comments
 (0)