diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-06-27 00:16:02 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-06-27 00:16:02 +0200 |
commit | 6e5d5f2fc104d3d8055a02c20ff08bbc605f3feb (patch) | |
tree | 36f315f10a94cc07a3692b3d6bfb128ca9bcd250 /test/test_youtube_sig.py | |
parent | 75c9481224ab435aa8c38403644a0e8b46b76db0 (diff) | |
parent | 5746f9da99bdb2439da152027212d49147133575 (diff) |
Merge branch 'master' of github.com:rg3/youtube-dl
Diffstat (limited to 'test/test_youtube_sig.py')
-rwxr-xr-x | test/test_youtube_sig.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/test_youtube_sig.py b/test/test_youtube_sig.py new file mode 100755 index 000000000..ddd27a9dc --- /dev/null +++ b/test/test_youtube_sig.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +import unittest +import sys + +# Allow direct execution +import os +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +from youtube_dl.extractor.youtube import YoutubeIE +from helper import FakeYDL + +sig = YoutubeIE(FakeYDL())._decrypt_signature + +class TestYoutubeSig(unittest.TestCase): + def test_43_43(self): + wrong = '5AEEAE0EC39677BC65FD9021CCD115F1F2DBD5A59E4.C0B243A3E2DED6769199AF3461781E75122AE135135' + right = '931EA22157E1871643FA9519676DED253A342B0C.4E95A5DBD2F1F511DCC1209DF56CB77693CE0EAE' + self.assertEqual(sig(wrong), right) + +if __name__ == '__main__': + unittest.main() |