projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[test/test_youtube_signature] Use fake YDL
[youtube-dl]
/
test
/
test_youtube_signature.py
diff --git
a/test/test_youtube_signature.py
b/test/test_youtube_signature.py
index 13d228cd85e9e260942635a36652c4cdc010dc8d..09696e19a29ded636f295dba334506dae403d3b4 100644
(file)
--- a/
test/test_youtube_signature.py
+++ b/
test/test_youtube_signature.py
@@
-8,11
+8,11
@@
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-
import io
import re
import string
import io
import re
import string
+from test.helper import FakeYDL
from youtube_dl.extractor import YoutubeIE
from youtube_dl.compat import compat_str, compat_urlretrieve
from youtube_dl.extractor import YoutubeIE
from youtube_dl.compat import compat_str, compat_urlretrieve
@@
-88,7
+88,8
@@
def make_tfunc(url, stype, sig_input, expected_sig):
if not os.path.exists(fn):
compat_urlretrieve(url, fn)
if not os.path.exists(fn):
compat_urlretrieve(url, fn)
- ie = YoutubeIE()
+ ydl = FakeYDL()
+ ie = YoutubeIE(ydl)
if stype == 'js':
with io.open(fn, encoding='utf-8') as testf:
jscode = testf.read()
if stype == 'js':
with io.open(fn, encoding='utf-8') as testf:
jscode = testf.read()