[youtube:truncated_url] Move test to extractor

This commit is contained in:
Philipp Hagemeister 2014-07-01 15:49:34 +02:00
parent c4808c6009
commit dc2fc73691
2 changed files with 3 additions and 3 deletions

View file

@ -69,9 +69,6 @@ def test_youtube_feeds(self):
def test_youtube_show_matching(self): def test_youtube_show_matching(self):
self.assertMatch('http://www.youtube.com/show/airdisasters', ['youtube:show']) self.assertMatch('http://www.youtube.com/show/airdisasters', ['youtube:show'])
def test_youtube_truncated(self):
self.assertMatch('http://www.youtube.com/watch?', ['youtube:truncated_url'])
def test_youtube_search_matching(self): def test_youtube_search_matching(self):
self.assertMatch('http://www.youtube.com/results?search_query=making+mustard', ['youtube:search_url']) self.assertMatch('http://www.youtube.com/results?search_query=making+mustard', ['youtube:search_url'])
self.assertMatch('https://www.youtube.com/results?baz=bar&search_query=youtube-dl+test+video&filters=video&lclk=video', ['youtube:search_url']) self.assertMatch('https://www.youtube.com/results?baz=bar&search_query=youtube-dl+test+video&filters=video&lclk=video', ['youtube:search_url'])

View file

@ -1835,6 +1835,9 @@ class YoutubeTruncatedURLIE(InfoExtractor):
_TESTS = [{ _TESTS = [{
'url': 'http://www.youtube.com/watch?annotation_id=annotation_3951667041', 'url': 'http://www.youtube.com/watch?annotation_id=annotation_3951667041',
'only_matching': True, 'only_matching': True,
}, {
'url': 'http://www.youtube.com/watch?',
'only_matching': True,
}] }]
def _real_extract(self, url): def _real_extract(self, url):