mirror of
https://github.com/streamlink/streamlink
synced 2024-08-18 10:15:04 +02:00
17 lines
804 B
Python
17 lines
804 B
Python
import unittest
|
|
|
|
from streamlink.plugins.adultswim import AdultSwim
|
|
|
|
|
|
class TestPluginAdultSwim(unittest.TestCase):
|
|
def test_can_handle_url(self):
|
|
# should match
|
|
self.assertTrue(AdultSwim.can_handle_url("http://www.adultswim.com/videos/streams/toonami"))
|
|
self.assertTrue(AdultSwim.can_handle_url("http://www.adultswim.com/videos/streams/"))
|
|
self.assertTrue(AdultSwim.can_handle_url("http://www.adultswim.com/videos/streams/last-stream-on-the-left"))
|
|
|
|
# shouldn't match
|
|
self.assertFalse(AdultSwim.can_handle_url("http://www.adultswim.com/videos/specials/the-adult-swim-golf-classic-extended/"))
|
|
self.assertFalse(AdultSwim.can_handle_url("http://www.tvcatchup.com/"))
|
|
self.assertFalse(AdultSwim.can_handle_url("http://www.youtube.com/"))
|