aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tcp.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2013-12-13 15:04:38 +0100
committerMaximilian Hils <git@maximilianhils.com>2013-12-13 15:04:38 +0100
commitf2e8efdf15a5f6bc3636eaf00b280c8ad6fda37b (patch)
treecd6740934b5692693d5d9153cdb538b3d6a289fb /test/test_tcp.py
parent969595cca70edc4d02d5f676221267edf01e4252 (diff)
parent6f26cec83e77f8998b50988c54196f9dfae5b7dd (diff)
downloadmitmproxy-f2e8efdf15a5f6bc3636eaf00b280c8ad6fda37b.tar.gz
mitmproxy-f2e8efdf15a5f6bc3636eaf00b280c8ad6fda37b.tar.bz2
mitmproxy-f2e8efdf15a5f6bc3636eaf00b280c8ad6fda37b.zip
merge smurfix/ipv6, add ipv6 support for TCPServer, add ipv6 test
Diffstat (limited to 'test/test_tcp.py')
-rw-r--r--test/test_tcp.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_tcp.py b/test/test_tcp.py
index 220ece15..75dcad13 100644
--- a/test/test_tcp.py
+++ b/test/test_tcp.py
@@ -74,6 +74,18 @@ class TestServer(test.ServerTestBase):
assert c.rfile.readline() == testval
+class TestServerIPv6(test.ServerTestBase):
+ handler = EchoHandler
+ use_ipv6 = True
+
+ def test_echo(self):
+ testval = "echo!\n"
+ c = tcp.TCPClient("::1", self.port, use_ipv6=True)
+ c.connect()
+ c.wfile.write(testval)
+ c.wfile.flush()
+ assert c.rfile.readline() == testval
+
class FinishFailHandler(tcp.BaseHandler):
def handle(self):