diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-04-29 10:27:09 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-04-29 10:27:09 +0200 |
commit | f3794ba1f7d649dc951d75f2940092f6ea88e7ef (patch) | |
tree | c3f057b28511130db27eb48ff7dcf563668e2b9e /Lib/test/test_poplib.py | |
parent | 563838be24bb081331ccb946b9d4c1b9a3a92aa8 (diff) | |
download | cpython-f3794ba1f7d649dc951d75f2940092f6ea88e7ef.tar.gz |
Fix failure in test_poplib after issue #20951.
Diffstat (limited to 'Lib/test/test_poplib.py')
-rw-r--r-- | Lib/test/test_poplib.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Lib/test/test_poplib.py b/Lib/test/test_poplib.py index d076fc1b9c..d695a0db12 100644 --- a/Lib/test/test_poplib.py +++ b/Lib/test/test_poplib.py @@ -349,23 +349,18 @@ class TestPOP3Class(TestCase): if SUPPORTS_SSL: + from test.test_ftplib import SSLConnection - class DummyPOP3_SSLHandler(DummyPOP3Handler): + class DummyPOP3_SSLHandler(SSLConnection, DummyPOP3Handler): def __init__(self, conn): asynchat.async_chat.__init__(self, conn) - ssl_socket = ssl.wrap_socket(self.socket, certfile=CERTFILE, - server_side=True, - do_handshake_on_connect=False) - self.del_channel() - self.set_socket(ssl_socket) - # Must try handshake before calling push() - self.tls_active = True - self.tls_starting = True - self._do_tls_handshake() + self.secure_connection() self.set_terminator(b"\r\n") self.in_buffer = [] self.push('+OK dummy pop3 server ready. <timestamp>') + self.tls_active = True + self.tls_starting = False @requires_ssl |