aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/utils.py
diff options
context:
space:
mode:
authorstratakis <cstratak@redhat.com>2018-11-30 17:56:56 +0100
committerVictor Stinner <vstinner@redhat.com>2018-11-30 17:56:56 +0100
commitb062ba77b617b0f89b7ea25d14cc77c991462ad4 (patch)
treecb62d8cc106876428d18b6a486337528304744ec /Lib/test/test_asyncio/utils.py
parent9eea6eaf23067880f4af3a130e3f67c9812e2f30 (diff)
downloadcpython-b062ba77b617b0f89b7ea25d14cc77c991462ad4.tar.gz
cpython-b062ba77b617b0f89b7ea25d14cc77c991462ad4.zip
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.
Diffstat (limited to 'Lib/test/test_asyncio/utils.py')
-rw-r--r--Lib/test/test_asyncio/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py
index b9489d7e745..7084edfeca9 100644
--- a/Lib/test/test_asyncio/utils.py
+++ b/Lib/test/test_asyncio/utils.py
@@ -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)