From b6791dab27e3a4a62208cffff9691b53ec0b0d21 Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Fri, 25 Oct 2019 16:17:09 +0200 Subject: [PATCH] Fix test_list_ip_addresses_with_host_scope test case Change-Id: I086d96e13d3d7712a8b4d95d5e4573de7e83358c --- tobiko/tests/functional/shell/test_ip.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tobiko/tests/functional/shell/test_ip.py b/tobiko/tests/functional/shell/test_ip.py index 82374e25d..d2cf717eb 100644 --- a/tobiko/tests/functional/shell/test_ip.py +++ b/tobiko/tests/functional/shell/test_ip.py @@ -50,10 +50,8 @@ class IpTest(testtools.TestCase): self.assertEqual(ips.with_attributes(version=4), []) self.assertEqual(ips.with_attributes(version=6), ips) elif scope == 'host': - self.assertEqual(ips.with_attributes(version=4), - [netaddr.IPAddress('127.0.0.1')]) - self.assertEqual(ips.with_attributes(version=6), - [netaddr.IPAddress('::1')]) + for a in ips: + self.assertTrue(a.is_loopback()) elif scope == 'global': self.assertNotIn(netaddr.IPAddress('127.0.0.1'), ips) self.assertNotIn(netaddr.IPAddress('::1'), ips)