File: test_bbciplayer.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 (26 lines) | stat: -rw-r--r-- 746 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from streamlink.plugins.bbciplayer import BBCiPlayer
from tests.plugins import PluginCanHandleUrl


class TestPluginCanHandleUrlBBCiPlayer(PluginCanHandleUrl):
    __plugin__ = BBCiPlayer

    should_match_groups = [
        (
            ("live", "http://www.bbc.co.uk/iplayer/live/bbcone"),
            {"channel_name": "bbcone"},
        ),
        (
            ("episode", "http://www.bbc.co.uk/iplayer/episode/b00ymh67/madagascar-1-island-of-marvels"),
            {"episode_id": "b00ymh67"},
        ),
    ]

    should_not_match = [
        "http://www.bbc.co.uk/iplayer/",
    ]


class TestPluginBBCiPlayer:
    def test_vpid_hash(self):
        assert BBCiPlayer._hash_vpid("1234567890") == "71c345435589c6ddeea70d6f252e2a52281ecbf3"