diff options
author | Christian Heimes <christian@python.org> | 2016-09-10 23:23:33 +0200 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2016-09-10 23:23:33 +0200 |
commit | d04863771b0c5bedeb1e4afe05dcba3adcc0fb58 (patch) | |
tree | fcd2630f24f426d5c1b084a9e16fe69ae4f5143a /Lib/test/test_urllib.py | |
parent | 130bbe5fd3d0bd0c494078aff19a5f8108707b89 (diff) | |
download | cpython-git-d04863771b0c5bedeb1e4afe05dcba3adcc0fb58.tar.gz |
Issue #28022: Deprecate ssl-related arguments in favor of SSLContext.
The deprecation include manual creation of SSLSocket and certfile/keyfile
(or similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib.
ssl.wrap_socket() is not marked as deprecated yet.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 8f06b08afa..43ea6b8b57 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -469,10 +469,11 @@ Connection: close @unittest.skipUnless(ssl, "ssl module required") def test_cafile_and_context(self): context = ssl.create_default_context() - with self.assertRaises(ValueError): - urllib.request.urlopen( - "https://localhost", cafile="/nonexistent/path", context=context - ) + with support.check_warnings(('', DeprecationWarning)): + with self.assertRaises(ValueError): + urllib.request.urlopen( + "https://localhost", cafile="/nonexistent/path", context=context + ) class urlopen_DataTests(unittest.TestCase): """Test urlopen() opening a data URL.""" |