[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] test_mapaddress_offline: make it work with python3.



commit fd7737b4cd43cfaf540ab7da2a34c48bc2623ed8
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Sep 17 20:18:06 2019 -0400

    test_mapaddress_offline: make it work with python3.
---
 test/integ/control/controller.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index a1d0655b..3980a318 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -1146,7 +1146,7 @@ class TestController(unittest.TestCase):
       map3 = {'0.0.0.0': 'quux'}
       x = controller.map_address(map3)
       self.assertEquals(len(x), 1)
-      (addr1, target) = x.items()[0]
+      (addr1, target) = list(x.items())[0]
       # The default IPv4 virtualaddressrange is 127.192.0.0/10
       self.assertTrue(addr1.startswith("127."),
                       "%s did not start with 127."%addr1)
@@ -1156,7 +1156,7 @@ class TestController(unittest.TestCase):
       map4 = {'::': 'quibble'}
       x = controller.map_address(map4)
       self.assertEquals(len(x), 1)
-      (addr2, target) = x.items()[0]
+      (addr2, target) = list(x.items())[0]
       # The default IPv6 virtualaddressrange is FE80::/10
       self.assertTrue(addr2.startswith("[fe"),
                       "%s did not start with [fe."%addr2)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits