diff options
Diffstat (limited to 'Lib/test/test_imaplib.py')
-rw-r--r-- | Lib/test/test_imaplib.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index ce60156..d1e3550 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -10,7 +10,7 @@ import calendar import threading import socket -from test.support import (reap_threads, verbose, transient_internet, +from test.support import (reap_threads, verbose, run_with_tz, run_with_locale, cpython_only) from test.support import hashlib_helper import unittest @@ -968,16 +968,16 @@ class RemoteIMAPTest(unittest.TestCase): imap_class = imaplib.IMAP4 def setUp(self): - with transient_internet(self.host): + with socket_helper.transient_internet(self.host): self.server = self.imap_class(self.host, self.port) def tearDown(self): if self.server is not None: - with transient_internet(self.host): + with socket_helper.transient_internet(self.host): self.server.logout() def test_logincapa(self): - with transient_internet(self.host): + with socket_helper.transient_internet(self.host): for cap in self.server.capabilities: self.assertIsInstance(cap, str) self.assertIn('LOGINDISABLED', self.server.capabilities) @@ -986,7 +986,7 @@ class RemoteIMAPTest(unittest.TestCase): self.assertEqual(rs[0], 'OK') def test_logout(self): - with transient_internet(self.host): + with socket_helper.transient_internet(self.host): rs = self.server.logout() self.server = None self.assertEqual(rs[0], 'BYE', rs) @@ -999,7 +999,7 @@ class RemoteIMAP_STARTTLSTest(RemoteIMAPTest): def setUp(self): super().setUp() - with transient_internet(self.host): + with socket_helper.transient_internet(self.host): rs = self.server.starttls() self.assertEqual(rs[0], 'OK') @@ -1039,24 +1039,24 @@ class RemoteIMAP_SSLTest(RemoteIMAPTest): server.logout() def test_logincapa(self): - with transient_internet(self.host): + with socket_helper.transient_internet(self.host): _server = self.imap_class(self.host, self.port) self.check_logincapa(_server) def test_logout(self): - with transient_internet(self.host): + with socket_helper.transient_internet(self.host): _server = self.imap_class(self.host, self.port) rs = _server.logout() self.assertEqual(rs[0], 'BYE', rs) def test_ssl_context_certfile_exclusive(self): - with transient_internet(self.host): + with socket_helper.transient_internet(self.host): self.assertRaises( ValueError, self.imap_class, self.host, self.port, certfile=CERTFILE, ssl_context=self.create_ssl_context()) def test_ssl_context_keyfile_exclusive(self): - with transient_internet(self.host): + with socket_helper.transient_internet(self.host): self.assertRaises( ValueError, self.imap_class, self.host, self.port, keyfile=CERTFILE, ssl_context=self.create_ssl_context()) |