def test_deserialize_from(): buf = HEADER * 2 offset = 0 header, offset = Header.deserialize_from(buf, offset) assert header.has_audio == True assert header.has_video == True header, offset = Header.deserialize_from(buf, offset) assert header.has_audio == True assert header.has_video == True
def test_deserialize(fd): header = Header.deserialize(fd) assert fd.tell() == HEADER_SIZE assert header.has_audio == True assert header.has_video == True
def create_header(): header = Header(has_audio=True, has_video=True) return header