From 353efec7ce032a447efbba60c5ccea441bc573fb Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 25 Jun 2012 14:42:15 +1200 Subject: Improve TCPClient interface. - Don't pass SSL parameters on instantiation. - Add a convert_to_ssl method analogous to that in TCPServer. --- test/test_tcp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test_tcp.py b/test/test_tcp.py index 1bad9a04..26286bc4 100644 --- a/test/test_tcp.py +++ b/test/test_tcp.py @@ -66,7 +66,7 @@ class TestServer(ServerTestBase): def test_echo(self): testval = "echo!\n" - c = tcp.TCPClient(False, "127.0.0.1", self.port, None) + c = tcp.TCPClient("127.0.0.1", self.port) c.connect() c.wfile.write(testval) c.wfile.flush() @@ -82,8 +82,9 @@ class TestServerSSL(ServerTestBase): return s def test_echo(self): - c = tcp.TCPClient(True, "127.0.0.1", self.port, None) + c = tcp.TCPClient("127.0.0.1", self.port) c.connect() + c.convert_to_ssl() testval = "echo!\n" c.wfile.write(testval) c.wfile.flush() @@ -92,7 +93,7 @@ class TestServerSSL(ServerTestBase): class TestTCPClient: def test_conerr(self): - c = tcp.TCPClient(True, "127.0.0.1", 0, None) + c = tcp.TCPClient("127.0.0.1", 0) tutils.raises(tcp.NetLibError, c.connect) -- cgit v1.2.3