コード例 #1
0
def test_enabled_service_list(monkeypatch):
    # Given
    monkeypatch.setattr(app, 'SUBTITLES_SERVICES_LIST', ['legendastv', 'a', 'tvsubtitles', 'shooter'])
    monkeypatch.setattr(app, 'SUBTITLES_SERVICES_ENABLED', [1, 1, 1, 0])

    # When
    actual = sut.enabled_service_list()

    # Then
    expected = ['legendastv', 'tvsubtitles']
    assert expected == actual
コード例 #2
0
ファイル: test_subtitles.py プロジェクト: pymedusa/SickRage
def test_enabled_service_list(monkeypatch):
    # Given
    monkeypatch.setattr(app, 'SUBTITLES_SERVICES_LIST', ['legendastv', 'a', 'itasa', 'tvsubtitles', 'shooter'])
    monkeypatch.setattr(app, 'SUBTITLES_SERVICES_ENABLED', [1, 1, 0, 1, 0])

    # When
    actual = sut.enabled_service_list()

    # Then
    expected = ['legendastv', 'tvsubtitles']
    assert expected == actual