Exemple #1
0
def test_refine__only_video(data):
    # Given
    video = data['video']
    expected = data['video_properties']

    # When
    sut.refine(video)

    # Then
    assert expected == _to_properties(video)
Exemple #2
0
def test_refine__with_tvepisode(data):
    # Given
    video = data['video']
    tvepisode = data['tvepisode']
    expected = dict(data['tvshow_properties'], **data['tvepisode_properties'])
    expected.update({'season': video.season, 'episode': video.episode})

    # When
    sut.refine(video, tv_episode=tvepisode)

    # Then
    assert expected == _to_properties(video)
Exemple #3
0
def test_refine__video_with_ids_skipping_tvepisode_info(data):
    # Given
    video = data['video']
    video.series_tvdb_id = 99
    video.tvdb_id = 88
    tvepisode = data['tvepisode']
    expected = dict(data['video_properties'], series_tvdb_id=video.series_tvdb_id, tvdb_id=video.tvdb_id)

    # When
    sut.refine(video, tv_episode=tvepisode)

    # Then
    assert expected == _to_properties(video)
Exemple #4
0
def test_refine__with_tvepisode_not_overwriting_resolution_format_and_release_group(data):
    # Given
    video = data['video']
    video.resolution = '720p'
    video.source = 'HDTV'
    video.release_group = 'AnotherGroup'
    tvepisode = data['tvepisode']
    expected = dict(data['tvshow_properties'], **data['tvepisode_properties'])
    expected = dict(expected, resolution=video.resolution, source=video.source, release_group=video.release_group,
                    season=video.season, episode=video.episode)

    # When
    sut.refine(video, tv_episode=tvepisode)

    # Then
    assert expected == _to_properties(video)