From: Philipp Hagemeister Date: Fri, 30 Jan 2015 01:57:37 +0000 (+0100) Subject: Add a test for --no-check-certificate X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=83fda3c000a680317cfc9bb6fec899beb8bca773;p=youtube-dl Add a test for --no-check-certificate --- diff --git a/test/test_http.py b/test/test_http.py new file mode 100644 index 000000000..5cce5b3ae --- /dev/null +++ b/test/test_http.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python +from __future__ import unicode_literals + +# Allow direct execution +import os +import sys +import unittest +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from youtube_dl import YoutubeDL +from youtube_dl.compat import compat_http_server +import ssl +import threading + +TEST_DIR = os.path.dirname(os.path.abspath(__file__)) + +class HTTPTestRequestHandler(compat_http_server.BaseHTTPRequestHandler): + def log_message(self, format, *args): + pass + + def do_GET(self): + if self.path == '/video.html': + self.send_response(200) + self.send_header('Content-Type', 'text/html; charset=utf-8') + self.end_headers() + self.wfile.write(b'