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

Re: [tor-bugs] #10240 [Obfsproxy]: Additional unit tests for obfsproxy/test/test_socks.py



#10240: Additional unit tests for obfsproxy/test/test_socks.py
---------------------------+-----------------
     Reporter:  dcf        |      Owner:  asn
         Type:  defect     |     Status:  new
     Priority:  minor      |  Milestone:
    Component:  Obfsproxy  |    Version:
   Resolution:             |   Keywords:
Actual Points:             |  Parent ID:
       Points:             |
---------------------------+-----------------

Comment (by dcf):

 Here's the output of running these tests.
 {{{
 [ERROR]
 Traceback (most recent call last):
   File "/home/david/branches/obfsproxy/obfsproxy/test/test_socks.py", line
 19, in test_socks_args_splitting
     socks_args = socks.split_socks_args("key=value\na=b")
   File "/home/david/branches/obfsproxy/obfsproxy/network/socks.py", line
 18, in split_socks_args
     return csv.reader([args_str], delimiter=';', escapechar='\\').next()
 _csv.Error: new-line character seen in unquoted field - do you need to
 open the file in universal-newline mode?
 }}}
 {{{
 [FAIL]
 Traceback (most recent call last):
   File "/home/david/branches/obfsproxy/obfsproxy/test/test_socks.py", line
 20, in test_socks_args_splitting
     self.assertListEqual(socks_args, ["key=\"value\"", "\"key\"=value",
 "\"key=value\"", "key=\"\"value\"\""])
   File "/usr/lib/python2.7/unittest/case.py", line 744, in assertListEqual
     self.assertSequenceEqual(list1, list2, msg, seq_type=list)
   File "/usr/lib/python2.7/unittest/case.py", line 726, in
 assertSequenceEqual
     self.fail(msg)
 twisted.trial.unittest.FailTest: Lists differ: ['key="value"',
 'key=value', '... != ['key="value"', '"key"=value',...

 First differing element 1:
 key=value
 "key"=value

 - ['key="value"', 'key=value', 'key=value', 'key=""value""']
 ?                             -------------

 + ['key="value"', '"key"=value', '"key=value"', 'key=""value""']
 ?                  ++++++++++++++++         +
 }}}
 {{{
 [FAIL]
 Traceback (most recent call last):
   File "/home/david/branches/obfsproxy/obfsproxy/test/test_socks.py", line
 20, in test_socks_args_splitting
     self.assertRaises(ValueError, socks.split_socks_args,
 "key=endingescape\\")
   File "/usr/lib/python2.7/dist-packages/twisted/trial/_synctest.py", line
 338, in assertRaises
     % (exception.__name__, result))
 twisted.trial.unittest.FailTest: ValueError not raised
 (['key=endingescape\n'] returned)
 }}}
 {{{
 [FAIL]
 Traceback (most recent call last):
   File "/home/david/branches/obfsproxy/obfsproxy/test/test_socks.py", line
 20, in test_socks_args_splitting
     self.assertRaises(ValueError, socks.split_socks_args, "=value")
   File "/usr/lib/python2.7/dist-packages/twisted/trial/_synctest.py", line
 338, in assertRaises
     % (exception.__name__, result))
 twisted.trial.unittest.FailTest: ValueError not raised (['=value']
 returned)
 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10240#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs