def test_is_supported_mpeg(mime, ver): """Test is_supported method.""" assert FFMpegWellformed.is_supported(mime, ver, True) assert FFMpegWellformed.is_supported(mime, None, True) assert not FFMpegWellformed.is_supported(mime, ver, False) assert FFMpegWellformed.is_supported(mime, 'foo', True) assert not FFMpegWellformed.is_supported('foo', ver, True)
def test_no_wellformed(): """Test scraper without well-formed check.""" scraper = FFMpegWellformed('tests/data/video_mpeg/valid_1.m1v', 'video/mpeg', False) scraper.scrape_file() assert 'Skipping scraper' in scraper.messages() assert scraper.well_formed is None
def test_ffmpeg_scraper_mov(filename, result_dict, mimetype, evaluate_scraper): """Test FFMpegWellformed.""" correct = parse_results(filename, mimetype, result_dict, True) scraper = FFMpegWellformed(correct.filename, mimetype, True) scraper.scrape_file() correct.version = None correct.streams[0]['version'] = None correct.streams[0]['stream_type'] = None evaluate_scraper(scraper, correct)