File: test_btv.py

package info (click to toggle)
streamlink 1.0.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,588 kB
  • sloc: python: 31,121; makefile: 141; sh: 93
file content (15 lines) | stat: -rw-r--r-- 533 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import unittest

from streamlink.plugins.btv import BTV


class TestPluginBTV(unittest.TestCase):
    def test_can_handle_url(self):
        # should match
        self.assertTrue(BTV.can_handle_url("http://btv.bg/live"))
        self.assertTrue(BTV.can_handle_url("http://btv.bg/live/"))
        self.assertTrue(BTV.can_handle_url("http://www.btv.bg/live/"))

        # shouldn't match
        self.assertFalse(BTV.can_handle_url("http://www.tvcatchup.com/"))
        self.assertFalse(BTV.can_handle_url("http://www.youtube.com/"))