diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-18 12:24:16 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-18 12:25:41 +0200 |
commit | 444b1165975ded5b38111c623ae6005391c13051 (patch) | |
tree | 125eacec61d015cc144765bffa8ae39cff9ac7e4 /test/test_youtube_sig.py | |
parent | 2aea08eda1f442d9a59a51718fbf9c3b34fd3b0a (diff) |
YoutubeIE: add algo for length 90 (closes #1064)
Order the cases from higher to lower length.
Diffstat (limited to 'test/test_youtube_sig.py')
-rw-r--r-- | test/test_youtube_sig.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/test_youtube_sig.py b/test/test_youtube_sig.py index b8e51f479..a8b1fe4dd 100644 --- a/test/test_youtube_sig.py +++ b/test/test_youtube_sig.py @@ -18,6 +18,16 @@ class TestYoutubeSig(unittest.TestCase): right = '931EA22157E1871643FA9519676DED253A342B0C.4E95A5DBD2F1F511DCC1209DF56CB77693CE0EAE' self.assertEqual(sig(wrong), right) + def test_92(self): + wrong = "F9F9B6E6FD47029957AB911A964CC20D95A181A5D37A2DBEFD67D403DB0E8BE4F4910053E4E8A79.0B70B.0B80B8" + right = "69B6E6FD47029957AB911A9F4CC20D95A181A5D3.A2DBEFD67D403DB0E8BE4F4910053E4E8A7980B7" + self.assertEqual(sig(wrong), right) + + def test_90(self): + wrong = "qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[]}|:;?/>.<'`" + right = "mrtyuioplkjhgfdsazxcvbne1234567890QWER[YUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={`]}|" + self.assertEqual(sig(wrong), right) + def test_88(self): wrong = "qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[]}|:;?/>.<" right = "J:|}][{=+-_)(*&;%$#@>MNBVCXZASDFGH^KLPOIUYTREWQ0987654321mnbvcxzasdfghrklpoiuytej" @@ -58,10 +68,5 @@ class TestYoutubeSig(unittest.TestCase): right = "urty8ioplkjhgfdsazxcvbqm1234567e90QWERTYUIOPLKHGFDSnZXCVBNM!@#$%^&*(-+={[};?/>." self.assertEqual(sig(wrong), right) - def test_92(self): - wrong = "F9F9B6E6FD47029957AB911A964CC20D95A181A5D37A2DBEFD67D403DB0E8BE4F4910053E4E8A79.0B70B.0B80B8" - right = "69B6E6FD47029957AB911A9F4CC20D95A181A5D3.A2DBEFD67D403DB0E8BE4F4910053E4E8A7980B7" - self.assertEqual(sig(wrong), right) - if __name__ == '__main__': unittest.main() |