diff options
author | Hai Shi <shihai1992@gmail.com> | 2020-04-29 09:11:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 03:11:29 +0200 |
commit | 66abe98a816de84f89e2de4aa78cf09056227c25 (patch) | |
tree | 2fc26658b4c09caf1ade36a8e0e45759232adf4e /Lib/test/test_imaplib.py | |
parent | 2208134918ee673451e4fc525bbeab71142d794a (diff) | |
download | cpython-git-66abe98a816de84f89e2de4aa78cf09056227c25.tar.gz |
bpo-40275: Move requires_hashdigest() to test.support.hashlib_helper (GH-19716)
Add a new test.support.hashlib_helper submodule.
Diffstat (limited to 'Lib/test/test_imaplib.py')
-rw-r--r-- | Lib/test/test_imaplib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index 69ee63b18c..ce601565cf 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -11,8 +11,8 @@ import threading import socket from test.support import (reap_threads, verbose, transient_internet, - run_with_tz, run_with_locale, cpython_only, - requires_hashdigest) + run_with_tz, run_with_locale, cpython_only) +from test.support import hashlib_helper import unittest from unittest import mock from datetime import datetime, timezone, timedelta @@ -385,7 +385,7 @@ class NewIMAPTestsMixin(): self.assertEqual(code, 'OK') self.assertEqual(server.response, b'ZmFrZQ==\r\n') # b64 encoded 'fake' - @requires_hashdigest('md5') + @hashlib_helper.requires_hashdigest('md5') def test_login_cram_md5_bytes(self): class AuthHandler(SimpleIMAPHandler): capabilities = 'LOGINDISABLED AUTH=CRAM-MD5' @@ -403,7 +403,7 @@ class NewIMAPTestsMixin(): ret, _ = client.login_cram_md5("tim", b"tanstaaftanstaaf") self.assertEqual(ret, "OK") - @requires_hashdigest('md5') + @hashlib_helper.requires_hashdigest('md5') def test_login_cram_md5_plain_text(self): class AuthHandler(SimpleIMAPHandler): capabilities = 'LOGINDISABLED AUTH=CRAM-MD5' @@ -849,7 +849,7 @@ class ThreadedNetworkedTests(unittest.TestCase): b'ZmFrZQ==\r\n') # b64 encoded 'fake' @reap_threads - @requires_hashdigest('md5') + @hashlib_helper.requires_hashdigest('md5') def test_login_cram_md5(self): class AuthHandler(SimpleIMAPHandler): |