mirror of
https://github.com/python/cpython.git
synced 2025-10-12 09:53:19 +00:00
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
This commit is contained in:
parent
49e27f0afb
commit
2fc936ed24
1 changed files with 2 additions and 0 deletions
|
@ -329,6 +329,7 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin):
|
||||||
finally:
|
finally:
|
||||||
self.unfakehttp()
|
self.unfakehttp()
|
||||||
|
|
||||||
|
@unittest.skipUnless(ssl, "ssl module required")
|
||||||
def test_url_with_control_char_rejected(self):
|
def test_url_with_control_char_rejected(self):
|
||||||
for char_no in list(range(0, 0x21)) + [0x7f]:
|
for char_no in list(range(0, 0x21)) + [0x7f]:
|
||||||
char = chr(char_no)
|
char = chr(char_no)
|
||||||
|
@ -354,6 +355,7 @@ class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin):
|
||||||
finally:
|
finally:
|
||||||
self.unfakehttp()
|
self.unfakehttp()
|
||||||
|
|
||||||
|
@unittest.skipUnless(ssl, "ssl module required")
|
||||||
def test_url_with_newline_header_injection_rejected(self):
|
def test_url_with_newline_header_injection_rejected(self):
|
||||||
self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
|
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"
|
host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue