mirror of
https://github.com/Hopiu/django-embed-video.git
synced 2026-03-16 21:30:23 +00:00
Add test for VideoBackend.get_info
This commit is contained in:
parent
e574f4cf2d
commit
49839aac1c
1 changed files with 5 additions and 1 deletions
|
|
@ -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 = (
|
||||
|
|
|
|||
Loading…
Reference in a new issue