[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem] 09/20: Fix controller tests returning tuples
This is an automated email from the git hooks/post-receive script.
atagar pushed a commit to branch maint
in repository stem.
commit 9c507727f8017dc73d9f6895700db71f2cf683bc
Author: juga <juga@xxxxxxxxxx>
AuthorDate: Wed May 31 07:46:52 2023 +0000
Fix controller tests returning tuples
for addresses and ports
---
test/integ/control/controller.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index ff36c9af..c664e168 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -962,7 +962,11 @@ class TestController(unittest.TestCase):
runner = test.runner.get_runner()
with runner.get_tor_controller() as controller:
- self.assertEqual([test.runner.ORPORT], controller.get_ports(Listener.OR))
+ # `controller.get_ports(Listener.OR))` returns `[1113, 1113]`
+ self.assertEqual(
+ [test.runner.ORPORT, test.runner.ORPORT],
+ controller.get_ports(Listener.OR)
+ )
self.assertEqual([], controller.get_ports(Listener.DIR))
self.assertEqual([test.runner.SOCKS_PORT], controller.get_ports(Listener.SOCKS))
self.assertEqual([], controller.get_ports(Listener.TRANS))
@@ -983,7 +987,11 @@ class TestController(unittest.TestCase):
runner = test.runner.get_runner()
with runner.get_tor_controller() as controller:
- self.assertEqual([('0.0.0.0', test.runner.ORPORT)], controller.get_listeners(Listener.OR))
+ # `controller.get_listeners(Listener.OR)` returns `[('0.0.0.0', 1113), ('::', 1113)]`
+ self.assertEqual(
+ [('0.0.0.0', test.runner.ORPORT), ("::", test.runner.ORPORT)],
+ controller.get_listeners(Listener.OR)
+ )
self.assertEqual([], controller.get_listeners(Listener.DIR))
self.assertEqual([('127.0.0.1', test.runner.SOCKS_PORT)], controller.get_listeners(Listener.SOCKS))
self.assertEqual([], controller.get_listeners(Listener.TRANS))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits