File: test_streann.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 (18 lines) | stat: -rw-r--r-- 826 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import unittest

from streamlink.plugins.streann import Streann


class TestPluginStreann(unittest.TestCase):
    def test_can_handle_url(self):
        should_match = [
            'https://ott.streann.com/streaming/player.html?U2FsdGVkX1/BPZsbal3VWfGa7sWzTIlFtDEU+hyCEHP9MavCxtCfL1G8nXtK5LHSsgFYhG3Nw9UilT1fx3H+lf5R54SLHAU6BKP/n7kjJBDF0HBFblSUHmApiEf5BrU3coECX9RQcRaOY+uLtkeyEktvlrQ5nhg2QRw5x1IjkxFD0Rk5/ylTYxMqnu8snxRe2p09iJLi9E6cG8eXSHZby2We+pyV0obzGDbI2Jpyh4dFL646strLxFraeAJq5+mfpTqK10XZQi3sXA1/ULDH5lz+I9bZW4q/wZtlEdyA0CuB9LpDvCM11imLIhthGnRz',
        ]
        for url in should_match:
            self.assertTrue(Streann.can_handle_url(url))

        should_not_match = [
            'https://ott.streann.com',
        ]
        for url in should_not_match:
            self.assertFalse(Streann.can_handle_url(url))