Exemplo n.º 1
0
def test_priority(url, priority):
    session = Mock()
    MPEGDASH.bind(session, "tests.plugins.test_dash")
    assert next(
        (matcher.priority
         for matcher in MPEGDASH.matchers if matcher.pattern.match(url)),
        NO_PRIORITY) == priority
Exemplo n.º 2
0
 def test_get_streams(self, parse_manifest):
     p = MPEGDASH("http://example.com/foo.mpd")
     p.bind(self.session, 'dash')
     p.streams()
     parse_manifest.assert_called_with(self.session, "http://example.com/foo.mpd")
Exemplo n.º 3
0
def test_get_streams(parse_manifest, url, expected):
    session = Mock()
    MPEGDASH.bind(session, "tests.plugins.test_dash")
    p = MPEGDASH(url)
    p.streams()
    parse_manifest.assert_called_with(session, expected)
Exemplo n.º 4
0
 def test_get_streams(self, parse_manifest):
     p = MPEGDASH("http://example.com/foo.mpd")
     p.bind(self.session, 'dash')
     p.streams()
     parse_manifest.assert_called_with(self.session, "http://example.com/foo.mpd")