[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[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:
Keywords: | Actual Points:
Parent ID: | Points:
-----------------------+---------------------
obfsproxy uses the Python csv module to parse SOCKS parameters. That
causes it to inherit some behavior involving quotes that's not in pt-
spec.txt.
Here are some tests that fail.
{{{
socks_args = socks.split_socks_args("key=value\na=b")
self.assertListEqual(socks_args, ["key=value\na=b"])
socks_args =
socks.split_socks_args("key=\"value\";\"key\"=value;\"key=value\";key=\"\"value\"\"")
self.assertListEqual(socks_args, ["key=\"value\"",
"\"key\"=value", "\"key=value\"", "key=\"\"value\"\""])
# ValueError? I dunno.
self.assertRaises(ValueError, socks.split_socks_args,
"key=endingescape\\")
self.assertRaises(ValueError, socks.split_socks_args, "=value")
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10240>
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