mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 08:08:15 -06:00
17414 add test
This commit is contained in:
parent
646796bd10
commit
a52f1c9cdc
@ -543,3 +543,17 @@ class TestVLANGroup(TestCase):
|
|||||||
|
|
||||||
vlan = VLAN(vid=109, name='VLAN 109', group=vlangroup)
|
vlan = VLAN(vid=109, name='VLAN 109', group=vlangroup)
|
||||||
vlan.full_clean()
|
vlan.full_clean()
|
||||||
|
|
||||||
|
def test_overlapping_vlan(self):
|
||||||
|
vlangroup = VLANGroup(
|
||||||
|
name='VLAN Group 1',
|
||||||
|
slug='vlan-group-1',
|
||||||
|
vid_ranges=string_to_ranges('2-4,3-5'),
|
||||||
|
)
|
||||||
|
with self.assertRaises(ValidationError):
|
||||||
|
vlangroup.full_clean()
|
||||||
|
|
||||||
|
# make sure single vlan range works
|
||||||
|
vlangroup.vid_ranges = string_to_ranges('2-2')
|
||||||
|
vlangroup.full_clean()
|
||||||
|
vlangroup.save()
|
||||||
|
Loading…
Reference in New Issue
Block a user