File: test_liveme.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-- 680 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import unittest

from streamlink.plugins.liveme import LiveMe


class TestPluginLiveMe(unittest.TestCase):
    def test_can_handle_url(self):
        # should match
        self.assertTrue(LiveMe.can_handle_url('http://www.liveme.com/live.html?videoid=12312312312312312312'))
        self.assertTrue(LiveMe.can_handle_url('http://www.liveme.com/live.html?videoid=23123123123123123123&countryCode=undefined'))

        # shouldn't match
        self.assertFalse(LiveMe.can_handle_url('http://www.liveme.com/'))
        self.assertFalse(LiveMe.can_handle_url('http://www.liveme.com/explore.html'))
        self.assertFalse(LiveMe.can_handle_url('http://www.liveme.com/media/play'))