mirror of
https://github.com/streamlink/streamlink
synced 2024-09-29 15:08:04 +02:00
19 lines
756 B
Python
19 lines
756 B
Python
|
import unittest
|
||
|
|
||
|
from streamlink.plugins.tf1 import TF1
|
||
|
|
||
|
|
||
|
class TestPluginTF1(unittest.TestCase):
|
||
|
def test_can_handle_url(self):
|
||
|
# should match
|
||
|
self.assertTrue(TF1.can_handle_url("http://tf1.fr/tf1/direct/"))
|
||
|
self.assertTrue(TF1.can_handle_url("http://lci.fr/direct"))
|
||
|
self.assertTrue(TF1.can_handle_url("http://www.lci.fr/direct"))
|
||
|
self.assertTrue(TF1.can_handle_url("http://tf1.fr/tmc/direct"))
|
||
|
|
||
|
# shouldn't match
|
||
|
self.assertFalse(TF1.can_handle_url("http://tf1.fr/direct"))
|
||
|
self.assertFalse(TF1.can_handle_url("http://www.tf1.fr/direct"))
|
||
|
self.assertFalse(TF1.can_handle_url("http://www.tvcatchup.com/"))
|
||
|
self.assertFalse(TF1.can_handle_url("http://www.youtube.com/"))
|