commit d7fd62fa581a8a6dba7213e9619561c5307e5540 Author: Isis Lovecruft isis@torproject.org Date: Wed Jun 11 21:35:33 2014 +0000
Fix old Tests.py; networkstatus.parseALine returns a string.
* CHANGE test_regressionsNewCode_IPBridgeDistTests_testDistWithFilterIP4() and test_regressionsNewCode_IPBridgeDistTests_testDistWithFilterIP6() to convert the string returned from networkstatus.parseALine into an ipaddr.IPAddress. --- lib/bridgedb/Tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bridgedb/Tests.py b/lib/bridgedb/Tests.py index 219802b..93ee4f2 100644 --- a/lib/bridgedb/Tests.py +++ b/lib/bridgedb/Tests.py @@ -320,7 +320,7 @@ class IPBridgeDistTests(unittest.TestCase): bridge = random.choice(bridges) bridge_line = bridge.getConfigLine(addressClass=ipaddr.IPv6Address) address, portlist = networkstatus.parseALine(bridge_line) - assert type(address) is ipaddr.IPv6Address + assert type(ipaddr.IPAddress(address)) is ipaddr.IPv6Address assert filterBridgesByIP6(random.choice(bridges))
def testDistWithFilterIP4(self): @@ -336,7 +336,7 @@ class IPBridgeDistTests(unittest.TestCase): bridge = random.choice(bridges) bridge_line = bridge.getConfigLine(addressClass=ipaddr.IPv4Address) address, portlist = networkstatus.parseALine(bridge_line) - assert type(address) is ipaddr.IPv4Address + assert type(ipaddr.IPAddress(address)) is ipaddr.IPv4Address assert filterBridgesByIP4(random.choice(bridges))
def testDistWithFilterBoth(self):