예제 #1
0
def test_get_matches_no_match(episodes):
    archive = LegendasTVArchive('537a74584945b', 'The.Big.Bang.Theory.S07.HDTV.x264', True, False,
                                'http://legendas.tv/download/537a74584945b/The_Big_Bang_Theory/'
                                'The_Big_Bang_Theory_S07_HDTV_x264', 6915, 10)
    subtitle = LegendasTVSubtitle(Language('por', 'BR'), 'episode', 'The Big Bang Theory', 2013, 'tt0898266', 7,
                                  archive, 'TBBT S07 x264/The.Big.Bang.Theory.S07E05.HDTV.x264-LOL.srt')

    matches = subtitle.get_matches(episodes['dallas_2012_s01e03'])
    assert matches == set()
예제 #2
0
def test_get_matches(episodes):
    archive = LegendasTVArchive('537a74584945b', 'The.Big.Bang.Theory.S07.HDTV.x264', True, False,
                                'http://legendas.tv/download/537a74584945b/The_Big_Bang_Theory/'
                                'The_Big_Bang_Theory_S07_HDTV_x264', 6915, 10)
    subtitle = LegendasTVSubtitle(Language('por', 'BR'), 'episode', 'The Big Bang Theory', 2013, 'tt0898266', 7,
                                  archive, 'TBBT S07 x264/The.Big.Bang.Theory.S07E05.HDTV.x264-LOL.srt')

    matches = subtitle.get_matches(episodes['bbt_s07e05'])
    assert matches == {'series', 'year', 'season', 'episode', 'format', 'video_codec', 'series_imdb_id'}
예제 #3
0
def test_get_matches_no_match(episodes):
    archive = LegendasTVArchive(
        '537a74584945b', 'The.Big.Bang.Theory.S07.HDTV.x264', True, False,
        'http://legendas.tv/download/537a74584945b/The_Big_Bang_Theory/'
        'The_Big_Bang_Theory_S07_HDTV_x264', 6915, 10)
    subtitle = LegendasTVSubtitle(
        Language('por',
                 'BR'), 'episode', 'The Big Bang Theory', 2013, 'tt0898266', 7,
        archive, 'TBBT S07 x264/The.Big.Bang.Theory.S07E05.HDTV.x264-LOL.srt')

    matches = subtitle.get_matches(episodes['dallas_2012_s01e03'])
    assert matches == set()
예제 #4
0
def test_get_matches(episodes):
    archive = LegendasTVArchive(
        '537a74584945b', 'The.Big.Bang.Theory.S07.HDTV.x264', True, False,
        'http://legendas.tv/download/537a74584945b/The_Big_Bang_Theory/'
        'The_Big_Bang_Theory_S07_HDTV_x264', 6915, 10)
    subtitle = LegendasTVSubtitle(
        Language('por',
                 'BR'), 'episode', 'The Big Bang Theory', 2013, 'tt0898266', 7,
        archive, 'TBBT S07 x264/The.Big.Bang.Theory.S07E05.HDTV.x264-LOL.srt')

    matches = subtitle.get_matches(episodes['bbt_s07e05'])
    assert matches == {
        'series', 'year', 'country', 'season', 'episode', 'release_group',
        'source', 'video_codec', 'series_imdb_id'
    }