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