mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
tests: fix video tests not running, related to #270, fix typo importorskip('youtube-dl') -> importorskip('youtube_dl')
This commit is contained in:
parent
61bf5e09ca
commit
84723c9d7d
@ -607,7 +607,7 @@ class TestRecorder(LiveServerTests, FakeRedisTests, TempDirTests, BaseTestClass)
|
|||||||
assert len(writer.fh_cache) == 0
|
assert len(writer.fh_cache) == 0
|
||||||
|
|
||||||
def test_record_video_metadata(self):
|
def test_record_video_metadata(self):
|
||||||
pytest.importorskip('youtube-dl')
|
pytest.importorskip('youtube_dl')
|
||||||
warc_path = to_path(self.root_dir + '/warcs/{user}/{coll}/')
|
warc_path = to_path(self.root_dir + '/warcs/{user}/{coll}/')
|
||||||
|
|
||||||
dedup_index = self._get_dedup_index()
|
dedup_index = self._get_dedup_index()
|
||||||
|
@ -381,7 +381,7 @@ foo=bar&test=abc"""
|
|||||||
assert resp.headers['Memento-Datetime'] == 'Mon, 29 Jul 2013 19:51:51 GMT'
|
assert resp.headers['Memento-Datetime'] == 'Mon, 29 Jul 2013 19:51:51 GMT'
|
||||||
|
|
||||||
def test_live_video_loader(self):
|
def test_live_video_loader(self):
|
||||||
pytest.importorskip('youtube-dl')
|
pytest.importorskip('youtube_dl')
|
||||||
params = {'url': 'http://www.youtube.com/v/BfBgWtAIbRc',
|
params = {'url': 'http://www.youtube.com/v/BfBgWtAIbRc',
|
||||||
'content_type': 'application/vnd.youtube-dl_formats+json'
|
'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
|
assert b'Content-Type: application/vnd.youtube-dl_formats+json' in resp.body
|
||||||
|
|
||||||
def test_live_video_loader_post(self):
|
def test_live_video_loader_post(self):
|
||||||
pytest.importorskip('youtube-dl')
|
pytest.importorskip('youtube_dl')
|
||||||
req_data = """\
|
req_data = """\
|
||||||
GET /v/BfBgWtAIbRc HTTP/1.1
|
GET /v/BfBgWtAIbRc HTTP/1.1
|
||||||
accept-encoding: gzip, deflate
|
accept-encoding: gzip, deflate
|
||||||
|
@ -54,7 +54,7 @@ class TestLiveRewriter(BaseConfigTest):
|
|||||||
assert resp.status_int == 400
|
assert resp.status_int == 400
|
||||||
|
|
||||||
def test_live_video_info(self):
|
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')
|
resp = self.testapp.get('/live/vi_/https://www.youtube.com/watch?v=DjFZyFWSt1M')
|
||||||
assert resp.status_int == 200
|
assert resp.status_int == 200
|
||||||
assert resp.content_type == 'application/vnd.youtube-dl_formats+json', resp.content_type
|
assert resp.content_type == 'application/vnd.youtube-dl_formats+json', resp.content_type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user