mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-19 05:21:55 -06:00
Removed redundant list call
This commit is contained in:
parent
c13b9d8798
commit
fe89982d4e
@ -14,7 +14,7 @@ class ExpandIPAddress(TestCase):
|
||||
'1.2.3.10/32',
|
||||
])
|
||||
|
||||
self.assertEqual(sorted(list(expand_ipaddress_pattern(input, 4))), output)
|
||||
self.assertEqual(sorted(expand_ipaddress_pattern(input, 4)), output)
|
||||
|
||||
def test_ipv4_set(self):
|
||||
input = '1.2.3.[4,44]/32'
|
||||
@ -23,7 +23,7 @@ class ExpandIPAddress(TestCase):
|
||||
'1.2.3.44/32',
|
||||
])
|
||||
|
||||
self.assertEqual(sorted(list(expand_ipaddress_pattern(input, 4))), output)
|
||||
self.assertEqual(sorted(expand_ipaddress_pattern(input, 4)), output)
|
||||
|
||||
def test_ipv4_multiple_ranges(self):
|
||||
input = '1.[9-10].3.[9-11]/32'
|
||||
@ -36,7 +36,7 @@ class ExpandIPAddress(TestCase):
|
||||
'1.10.3.11/32',
|
||||
])
|
||||
|
||||
self.assertEqual(sorted(list(expand_ipaddress_pattern(input, 4))), output)
|
||||
self.assertEqual(sorted(expand_ipaddress_pattern(input, 4)), output)
|
||||
|
||||
def test_ipv4_multiple_sets(self):
|
||||
input = '1.[2,22].3.[4,44]/32'
|
||||
@ -47,8 +47,7 @@ class ExpandIPAddress(TestCase):
|
||||
'1.22.3.44/32',
|
||||
])
|
||||
|
||||
self.assertEqual(sorted(list(expand_ipaddress_pattern(input, 4))), output)
|
||||
|
||||
self.assertEqual(sorted(expand_ipaddress_pattern(input, 4)), output)
|
||||
|
||||
def test_ipv4_set_and_range(self):
|
||||
input = '1.[2,22].3.[9-11]/32'
|
||||
@ -61,7 +60,7 @@ class ExpandIPAddress(TestCase):
|
||||
'1.22.3.11/32',
|
||||
])
|
||||
|
||||
self.assertEqual(sorted(list(expand_ipaddress_pattern(input, 4))), output)
|
||||
self.assertEqual(sorted(expand_ipaddress_pattern(input, 4)), output)
|
||||
|
||||
# TODO: IPv6
|
||||
# TODO: negative tests
|
||||
|
Loading…
Reference in New Issue
Block a user