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

from streamlink.plugins.vidio import Vidio


class TestPluginVidio(unittest.TestCase):
    def test_can_handle_url(self):
        # should match
        self.assertTrue(Vidio.can_handle_url('https://www.vidio.com/live/204-sctv-tv-stream'))
        self.assertTrue(Vidio.can_handle_url('https://www.vidio.com/live/5075-dw-tv-stream'))
        self.assertTrue(Vidio.can_handle_url('https://www.vidio.com/watch/766861-5-rekor-fantastis-zidane-bersama-real-madrid'))

        # shouldn't match
        self.assertFalse(Vidio.can_handle_url('http://www.vidio.com'))
        self.assertFalse(Vidio.can_handle_url('https://www.vidio.com'))