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

from streamlink.plugins.streamme import StreamMe


class TestPluginStreamMe(unittest.TestCase):
    def test_can_handle_url(self):
        # should match
        self.assertTrue(StreamMe.can_handle_url("http://www.stream.me/nameofstream"))

        # shouldn't match
        self.assertFalse(StreamMe.can_handle_url("http://www.livestream.me/nameofstream"))
        self.assertFalse(StreamMe.can_handle_url("http://www.streamme.com/nameofstream"))
        self.assertFalse(StreamMe.can_handle_url("http://www.streamme.me/nameofstream"))
        self.assertFalse(StreamMe.can_handle_url("http://www.youtube.com/"))