Beispiel #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)
Beispiel #2
0
def test_refine__with_tvepisode(data):
    # Given
    video = data['video']
    tvepisode = data['tvepisode']
    expected = dict(data['tvshow_properties'], **data['tvepisode_properties'])

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

    # Then
    assert expected == _to_properties(video)
Beispiel #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)
Beispiel #4
0
def test_refine__with_tvepisode_not_overwriting_resolution_format_and_release_group(
        data):
    # Given
    video = data['video']
    video.resolution = '720p'
    video.format = 'HDTV'
    video.release_group = 'AnotherGroup'
    tvepisode = data['tvepisode']
    expected = dict(data['tvshow_properties'], **data['tvepisode_properties'])
    expected = dict(expected,
                    resolution=video.resolution,
                    format=video.format,
                    release_group=video.release_group)

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

    # Then
    assert expected == _to_properties(video)