mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
bpo-40275: Move requires_hashdigest() to test.support.hashlib_helper (GH-19716)
Add a new test.support.hashlib_helper submodule.
This commit is contained in:
parent
2208134918
commit
66abe98a81
9 changed files with 71 additions and 68 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue