mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-35352: test_asyncio uses the certificate set from the test directory (GH-10826)
Modify asyncio tests to utilize the certificates from the test directory instead of its own set, as they are the same and with each update they had to be updated as well.
This commit is contained in:
parent
9eea6eaf23
commit
b062ba77b6
6 changed files with 4 additions and 185 deletions
|
@ -40,7 +40,7 @@ def data_file(filename):
|
|||
fullname = os.path.join(support.TEST_HOME_DIR, filename)
|
||||
if os.path.isfile(fullname):
|
||||
return fullname
|
||||
fullname = os.path.join(os.path.dirname(__file__), filename)
|
||||
fullname = os.path.join(os.path.dirname(__file__), '..', filename)
|
||||
if os.path.isfile(fullname):
|
||||
return fullname
|
||||
raise FileNotFoundError(filename)
|
||||
|
@ -160,8 +160,8 @@ class SSLWSGIServerMixin:
|
|||
if not os.path.isdir(here):
|
||||
here = os.path.join(os.path.dirname(os.__file__),
|
||||
'test', 'test_asyncio')
|
||||
keyfile = os.path.join(here, 'ssl_key.pem')
|
||||
certfile = os.path.join(here, 'ssl_cert.pem')
|
||||
keyfile = os.path.join(here, ONLYKEY)
|
||||
certfile = os.path.join(here, ONLYCERT)
|
||||
context = ssl.SSLContext()
|
||||
context.load_cert_chain(certfile, keyfile)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue