[tor-commits] [nyx/master] Correct tests with new '--interface :80' behavior

atagar at torproject.org atagar at torproject.org
Thu Jan 3 22:03:24 UTC 2019


commit 74e4a518a432bae4f4f81ce599e7a115bcec9521
Author: Damian Johnson <atagar at torproject.org>
Date:   Thu Jan 3 14:02:15 2019 -0800

    Correct tests with new '--interface :80' behavior
    
    Oops, commit 5453231 changed our argument parsing behavior in a way that broke
    our tests.
---
 test/arguments.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/arguments.py b/test/arguments.py
index 5223af5..e9d6665 100644
--- a/test/arguments.py
+++ b/test/arguments.py
@@ -21,6 +21,9 @@ class TestArgumentParsing(unittest.TestCase):
     args = parse(['--interface', '80'])
     self.assertEqual((DEFAULT_ARGS['control_port'][0], 80), args.control_port)
 
+    args = parse(['--interface', ':80'])
+    self.assertEqual((DEFAULT_ARGS['control_port'][0], 80), args.control_port)
+
     args = parse(['--socket', '/tmp/my_socket', '--config', '/tmp/my_config'])
     self.assertEqual('/tmp/my_socket', args.control_socket)
     self.assertEqual('/tmp/my_config', args.config)
@@ -72,7 +75,6 @@ class TestArgumentParsing(unittest.TestCase):
       'blarg',
       '127.0.0.1',
       '127.0.0.1:',
-      ':80',
       '400.0.0.1:80',
       '127.0.0.1:-5',
       '127.0.0.1:500000',



More information about the tor-commits mailing list