diff options
author | Xtreak <tir.karthi@gmail.com> | 2019-05-01 11:59:49 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-05-01 11:59:48 (GMT) |
commit | 2fc936ed24cf04ed32f6015a8aa78c8ea40da66b (patch) | |
tree | a1c366ddafc527f7a6f744850b42081bbd325721 | |
parent | 49e27f0afb02ce7b98ed5a4387238850117f4c7e (diff) | |
download | cpython-2fc936ed24cf04ed32f6015a8aa78c8ea40da66b.zip cpython-2fc936ed24cf04ed32f6015a8aa78c8ea40da66b.tar.gz cpython-2fc936ed24cf04ed32f6015a8aa78c8ea40da66b.tar.bz2 |
bpo-30458: Disable https related urllib tests on a build without ssl (GH-13032)
These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures.
https://bugs.python.org/issue30458
-rw-r--r-- | Lib/test/test_urllib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index e87c85b..c5b23f9 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -329,6 +329,7 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin): finally: self.unfakehttp() + @unittest.skipUnless(ssl, "ssl module required") def test_url_with_control_char_rejected(self): for char_no in list(range(0, 0x21)) + [0x7f]: char = chr(char_no) @@ -354,6 +355,7 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin): finally: self.unfakehttp() + @unittest.skipUnless(ssl, "ssl module required") def test_url_with_newline_header_injection_rejected(self): self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.") host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123" |