예제 #1
0
 def test_get_streams(self, parse_manifest):
     session = Mock()
     Plugin.bind(session, "tests.plugins.test_dash")
     p = MPEGDASH("http://example.com/foo.mpd")
     p.streams()
     parse_manifest.assert_called_with(session,
                                       "http://example.com/foo.mpd")
예제 #2
0
def test_priority(url, priority):
    session = Mock()
    Plugin.bind(session, "tests.plugins.test_dash")
    assert next(
        (matcher.priority
         for matcher in MPEGDASH.matchers if matcher.pattern.match(url)),
        NO_PRIORITY) == priority
예제 #3
0
 def stream_weight(cls, stream):
     return Plugin.stream_weight(stream)