mirror of
https://github.com/Hopiu/django-embed-video.git
synced 2026-05-18 09:31:07 +00:00
28 lines
883 B
Python
28 lines
883 B
Python
from unittest import TestCase
|
|
|
|
from . import BackendTestMixin
|
|
from embed_video import backends
|
|
|
|
|
|
class HTML5BackendTestCase(TestCase):
|
|
def test_url(self):
|
|
url = 'https://collab-project.github.io/videojs-wavesurfer/examples/media/heres_johnny.wav'
|
|
backend = backends.detect_backend(url)
|
|
self.assertEqual(backend.get_url(), url)
|
|
|
|
|
|
class Html5VideoBackendTestCase(BackendTestMixin, TestCase):
|
|
urls = (
|
|
('http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4', None),
|
|
('https://collab-project.github.io/videojs-wavesurfer/examples/media/example.mp4', None),
|
|
)
|
|
|
|
instance = backends.Html5VideoBackend
|
|
|
|
|
|
class Html5AudioBackendTestCase(BackendTestMixin, TestCase):
|
|
urls = (
|
|
('https://collab-project.github.io/videojs-wavesurfer/examples/media/heres_johnny.wav', None),
|
|
)
|
|
|
|
instance = backends.Html5AudioBackend
|