Beispiel #1
0
def test_add_rendition_report_to_playlist():
    obj = m3u8.M3U8()

    obj.add_rendition_report(
        RenditionReport(base_uri='',
                        uri='../1M/waitForMSN.php',
                        last_msn=273,
                        last_part=3))

    result = obj.dumps()
    expected = '#EXT-X-RENDITION-REPORT:URI="../1M/waitForMSN.php",LAST-MSN=273,LAST-PART=3'

    assert expected in result
Beispiel #2
0
def test_add_rendition_report_to_playlist():
    obj = m3u8.M3U8()

    obj.add_rendition_report(
        RenditionReport(base_uri=None,
                        uri='../1M/waitForMSN.php',
                        last_msn=273,
                        last_part=0))

    obj.base_path = 'http://localhost/test'

    result = obj.dumps()
    expected = '#EXT-X-RENDITION-REPORT:URI="http://localhost/test/waitForMSN.php",LAST-MSN=273,LAST-PART=0'

    assert expected in result