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
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