bpo-30458: Disable https related urllib tests on a build without ssl … · python/cpython@2fc936e (original) (raw)

Original file line number Diff line number Diff line change
@@ -329,6 +329,7 @@ def test_willclose(self):
329 329 finally:
330 330 self.unfakehttp()
331 331
332 +@unittest.skipUnless(ssl, "ssl module required")
332 333 def test_url_with_control_char_rejected(self):
333 334 for char_no in list(range(0, 0x21)) + [0x7f]:
334 335 char = chr(char_no)
@@ -354,6 +355,7 @@ def test_url_with_control_char_rejected(self):
354 355 finally:
355 356 self.unfakehttp()
356 357
358 +@unittest.skipUnless(ssl, "ssl module required")
357 359 def test_url_with_newline_header_injection_rejected(self):
358 360 self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.")
359 361 host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"