bpo-30231: Remove skipped test_imaplib tests (#1419) (#2192) · python/cpython@8a39af9
@@ -13,7 +13,7 @@
1313import inspect
14141515from test.support import (reap_threads, verbose, transient_internet,
16-run_with_tz, run_with_locale)
16+run_with_tz, run_with_locale, cpython_only)
1717import unittest
1818from unittest import mock
1919from datetime import datetime, timezone, timedelta
@@ -504,6 +504,15 @@ def test_ssl_verified(self):
504504ssl_context=ssl_context)
505505client.shutdown()
506506507+# Mock the private method _connect(), so mark the test as specific
508+# to CPython stdlib
509+@cpython_only
510+def test_certfile_arg_warn(self):
511+with support.check_warnings(('', DeprecationWarning)):
512+with mock.patch.object(self.imap_class, 'open'):
513+with mock.patch.object(self.imap_class, '_connect'):
514+self.imap_class('localhost', 143, certfile=CERTFILE)
515+507516class ThreadedNetworkedTests(unittest.TestCase):
508517server_class = socketserver.TCPServer
509518imap_class = imaplib.IMAP4
@@ -966,25 +975,6 @@ def test_logincapa(self):
966975_server = self.imap_class(self.host, self.port)
967976self.check_logincapa(_server)
968977969-@unittest.skipIf(True,
970- "bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept "
971- "our randomly generated client x509 certificate anymore")
972-def test_logincapa_with_client_certfile(self):
973-with transient_internet(self.host):
974-with support.check_warnings(('', DeprecationWarning)):
975-_server = self.imap_class(self.host, self.port,
976-certfile=CERTFILE)
977-self.check_logincapa(_server)
978-979-@unittest.skipIf(True,
980- "bpo-30175: FIXME: cyrus.andrew.cmu.edu doesn't accept "
981- "our randomly generated client x509 certificate anymore")
982-def test_logincapa_with_client_ssl_context(self):
983-with transient_internet(self.host):
984-_server = self.imap_class(
985-self.host, self.port, ssl_context=self.create_ssl_context())
986-self.check_logincapa(_server)
987-988978def test_logout(self):
989979with transient_internet(self.host):
990980_server = self.imap_class(self.host, self.port)