def test_get_biggest_cover_when_no_covers_exist( self, tmpdir, bluray_analyzer): bluray_dir = tmpdir.mkdir('bluray_disc') bluray_disc = BlurayDisc(str(bluray_dir), bluray_analyzer) biggest_cover = bluray_disc.get_biggest_cover() assert biggest_cover is None
def test_get_movie_playlists_when_there_are_no_playlists( self, ffprobe, mkvmerge, bluray_dir): class TestBlurayAnalyzer(BlurayAnalyzer): def get_playlists(self, disc_path): return dict() bluray_analyzer = TestBlurayAnalyzer(ffprobe, mkvmerge) bluray_disc = BlurayDisc(str(bluray_dir), bluray_analyzer) movie_playlists = bluray_disc.get_movie_playlists() assert movie_playlists == []
def test_get_forced_subtitles_when_there_are_no_subtitles( self, ffprobe, mkvmerge, bluray_dir): class TestBlurayAnalyzer(BlurayAnalyzer): def get_subtitles_frames_count(self, disc_path, playlist_number): return dict() bluray_analyzer = TestBlurayAnalyzer(ffprobe, mkvmerge) bluray_disc = BlurayDisc(str(bluray_dir), bluray_analyzer) bluray_playlist = BlurayPlaylist( disc=bluray_disc, number=29, duration=timedelta(hours=1), size=16970468352) forced_subtitles = bluray_playlist.get_forced_subtitles() assert isinstance(forced_subtitles, OrderedDict) assert forced_subtitles == OrderedDict()
def bluray_disc(bluray_analyzer, bluray_dir): return BlurayDisc(str(bluray_dir), bluray_analyzer)