python3: convert range object to list before comparing with a list
In python3, calling range() doesn't produce a list, but an iterable. We need to explicitly convert it to a list, otherwise we get an error: MismatchError: range(5, 16) != [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] Change-Id: Ie55c0d0a98a2b81c237ef42a55f7ce4b129828fb
This commit is contained in:
parent
d545d19522
commit
26b4c5606c
|
@ -277,7 +277,7 @@ class FirewallTestCase(BaseFirewallTestCase):
|
|||
(outgoing_rule_pref, i['port_range_min']))
|
||||
for i in sg_rules]
|
||||
# all indexes should be in order with no unexpected rules in between
|
||||
self.assertEqual(range(indexes[0], indexes[-1] + 1), indexes)
|
||||
self.assertEqual(list(range(indexes[0], indexes[-1] + 1)), indexes)
|
||||
|
||||
def test_ingress_icmp_secgroup(self):
|
||||
# update the sg_group to make ping pass
|
||||
|
|
Loading…
Reference in New Issue