File: test_htv.py

package info (click to toggle)
streamlink 8.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,564 kB
  • sloc: python: 51,188; sh: 184; makefile: 152
file content (24 lines) | stat: -rw-r--r-- 883 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from streamlink.plugins.htv import HTV
from tests.plugins import PluginCanHandleUrl


class TestPluginCanHandleUrlHTV(PluginCanHandleUrl):
    __plugin__ = HTV

    should_match_groups = [
        ("https://htv.com.vn/truc-tuyen", {}),
        ("https://htv.com.vn/truc-tuyen?channel=123", {"channel": "123"}),
        ("https://htv.com.vn/truc-tuyen?channel=123&foo", {"channel": "123"}),
        ("https://www.htv.com.vn/truc-tuyen", {}),
        ("https://www.htv.com.vn/truc-tuyen?channel=123", {"channel": "123"}),
        ("https://www.htv.com.vn/truc-tuyen?channel=123&foo", {"channel": "123"}),
    ]

    should_not_match = [
        "https://htv.com.vn/",
        "https://htv.com.vn/any/path",
        "https://htv.com.vn/truc-tuyen?foo",
        "https://www.htv.com.vn/",
        "https://www.htv.com.vn/any/path",
        "https://www.htv.com.vn/truc-tuyen?foo",
    ]