|
|
@ -39,7 +39,11 @@ class TestClientCert(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
|
|
def test_check_clientcertificate(self):
|
|
|
|
def test_check_clientcertificate(self):
|
|
|
|
clientcertfn = os.path.join(TEST_DIR, 'testdata', 'clientcert', 'client.crt')
|
|
|
|
clientcertfn = os.path.join(TEST_DIR, 'testdata', 'clientcert', 'client.crt')
|
|
|
|
ydl = YoutubeDL({'logger': FakeLogger(), 'clientcertificate': clientcertfn})
|
|
|
|
ydl = YoutubeDL({'logger': FakeLogger(), 'clientcertificate': clientcertfn,
|
|
|
|
|
|
|
|
# Disable client-side validation of unacceptable self-signed testcert.pem
|
|
|
|
|
|
|
|
# The test is of a check on the server side, so unaffected
|
|
|
|
|
|
|
|
'nocheckcertificate': True,
|
|
|
|
|
|
|
|
})
|
|
|
|
r = ydl.extract_info('https://127.0.0.1:%d/video.html' % self.port)
|
|
|
|
r = ydl.extract_info('https://127.0.0.1:%d/video.html' % self.port)
|
|
|
|
self.assertEqual(r['entries'][0]['url'], 'https://127.0.0.1:%d/vid.mp4' % self.port)
|
|
|
|
self.assertEqual(r['entries'][0]['url'], 'https://127.0.0.1:%d/vid.mp4' % self.port)
|
|
|
|
|
|
|
|
|
|
|
|