Add test for VideoBackend.get_info

This commit is contained in:
Juda Kaleta 2014-02-24 22:23:49 +01:00
parent e574f4cf2d
commit 49839aac1c

View file

@ -4,7 +4,7 @@ import requests
from ..backends import detect_backend, YoutubeBackend, VimeoBackend, \
SoundCloudBackend, UnknownBackendException, \
VideoDoesntExistException, UnknownIdException
VideoDoesntExistException, UnknownIdException, VideoBackend
class BackendTestMixin(object):
@ -31,6 +31,10 @@ class VideoBackendTestCase(TestCase):
for url in self.unknown_backend_urls:
self.assertRaises(UnknownBackendException, detect_backend, url)
def test_not_implemented_get_info(self):
backend = VideoBackend('http://www.example.com')
self.assertRaises(NotImplementedError, backend.get_info)
class YoutubeBackendTestCase(BackendTestMixin, TestCase):
urls = (