6 # Allow direct execution
8 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
10 from youtube_dl.extractor.youtube import YoutubeIE
11 from helper import FakeYDL
13 sig = YoutubeIE(FakeYDL())._decrypt_signature
15 class TestYoutubeSig(unittest.TestCase):
17 wrong = '5AEEAE0EC39677BC65FD9021CCD115F1F2DBD5A59E4.C0B243A3E2DED6769199AF3461781E75122AE135135'
18 right = '931EA22157E1871643FA9519676DED253A342B0C.4E95A5DBD2F1F511DCC1209DF56CB77693CE0EAE'
19 self.assertEqual(sig(wrong), right)
21 if __name__ == '__main__':