mirror of
https://github.com/Hopiu/django-embed-video.git
synced 2026-04-06 14:30:58 +00:00
17 lines
429 B
Python
17 lines
429 B
Python
from embed_video.backends import detect_backend
|
|
|
|
|
|
class BackendTestMixin(object):
|
|
urls = []
|
|
instance = None
|
|
|
|
def test_detect(self):
|
|
for url in self.urls:
|
|
backend = detect_backend(url[0])
|
|
self.assertIsInstance(backend, self.instance)
|
|
|
|
def test_code(self):
|
|
for url in self.urls:
|
|
backend = self.instance(url[0])
|
|
self.assertEqual(backend.code, url[1])
|
|
|