1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

tests: fix video tests not running, related to #270, fix typo importorskip('youtube-dl') -> importorskip('youtube_dl')

This commit is contained in:
Ilya Kreymer 2018-02-27 17:49:36 -08:00
parent 61bf5e09ca
commit 84723c9d7d
3 changed files with 4 additions and 4 deletions

View File

@ -607,7 +607,7 @@ class TestRecorder(LiveServerTests, FakeRedisTests, TempDirTests, BaseTestClass)
assert len(writer.fh_cache) == 0
def test_record_video_metadata(self):
pytest.importorskip('youtube-dl')
pytest.importorskip('youtube_dl')
warc_path = to_path(self.root_dir + '/warcs/{user}/{coll}/')
dedup_index = self._get_dedup_index()

View File

@ -381,7 +381,7 @@ foo=bar&test=abc"""
assert resp.headers['Memento-Datetime'] == 'Mon, 29 Jul 2013 19:51:51 GMT'
def test_live_video_loader(self):
pytest.importorskip('youtube-dl')
pytest.importorskip('youtube_dl')
params = {'url': 'http://www.youtube.com/v/BfBgWtAIbRc',
'content_type': 'application/vnd.youtube-dl_formats+json'
}
@ -399,7 +399,7 @@ foo=bar&test=abc"""
assert b'Content-Type: application/vnd.youtube-dl_formats+json' in resp.body
def test_live_video_loader_post(self):
pytest.importorskip('youtube-dl')
pytest.importorskip('youtube_dl')
req_data = """\
GET /v/BfBgWtAIbRc HTTP/1.1
accept-encoding: gzip, deflate

View File

@ -54,7 +54,7 @@ class TestLiveRewriter(BaseConfigTest):
assert resp.status_int == 400
def test_live_video_info(self):
pytest.importorskip('youtube-dl')
pytest.importorskip('youtube_dl')
resp = self.testapp.get('/live/vi_/https://www.youtube.com/watch?v=DjFZyFWSt1M')
assert resp.status_int == 200
assert resp.content_type == 'application/vnd.youtube-dl_formats+json', resp.content_type