]>
jfr.im git - yt-dlp.git/blob - test/test_iqiyi_sdk_interpreter.py
2 # Allow direct execution
6 sys
.path
.insert(0, os
.path
.dirname(os
.path
.dirname(os
.path
.abspath(__file__
))))
8 from test
.helper
import FakeYDL
, is_download_test
9 from yt_dlp
.extractor
import IqiyiIE
16 def warning(self
, msg
):
17 self
.messages
.append(msg
)
27 class TestIqiyiSDKInterpreter(unittest
.TestCase
):
28 def test_iqiyi_sdk_interpreter(self
):
30 Test the functionality of IqiyiSDKInterpreter by trying to log in
32 If `sign` is incorrect, /validate call throws an HTTP 556 error
34 logger
= WarningLogger()
35 ie
= IqiyiIE(FakeYDL({'logger': logger}
))
36 ie
._perform
_login
('foo', 'bar')
37 self
.assertTrue('unable to log in:' in logger
.messages
[0])
40 if __name__
== '__main__':