generated from unai/python_boilerplate
feat: add include_text and exclude_text filters to settings and playlist tests
This commit is contained in:
@@ -28,6 +28,55 @@ def sample_channels():
|
||||
]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def channels_for_filtering():
|
||||
"""Fixture con canales para probar filtros de inclusión/exclusión."""
|
||||
return [
|
||||
{
|
||||
"name": "ESPN Sports",
|
||||
"stream_id": 201,
|
||||
"stream_icon": "http://example.com/espn.png",
|
||||
"category_id": "sports",
|
||||
},
|
||||
{
|
||||
"name": "HBO Movies",
|
||||
"stream_id": 202,
|
||||
"stream_icon": "http://example.com/hbo.png",
|
||||
"category_id": "movies",
|
||||
},
|
||||
{
|
||||
"name": "CNN News",
|
||||
"stream_id": 203,
|
||||
"stream_icon": "http://example.com/cnn.png",
|
||||
"category_id": "news",
|
||||
},
|
||||
{
|
||||
"name": "Sports Center ESPN",
|
||||
"stream_id": 204,
|
||||
"stream_icon": "http://example.com/sc.png",
|
||||
"category_id": "sports",
|
||||
},
|
||||
{
|
||||
"name": "BBC World",
|
||||
"stream_id": 205,
|
||||
"stream_icon": "http://example.com/bbc.png",
|
||||
"category_id": "news",
|
||||
},
|
||||
{
|
||||
"name": "Adult Content",
|
||||
"stream_id": 206,
|
||||
"stream_icon": "http://example.com/adult.png",
|
||||
"category_id": "adult",
|
||||
},
|
||||
{
|
||||
"name": "FOX News",
|
||||
"stream_id": 207,
|
||||
"stream_icon": "http://example.com/fox.png",
|
||||
"category_id": "news",
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def empty_channels():
|
||||
"""Fixture con lista vacía de canales."""
|
||||
@@ -51,5 +100,7 @@ def mock_settings(monkeypatch):
|
||||
port = 8080
|
||||
update_interval = 60
|
||||
output_file = "test_playlist.m3u"
|
||||
include_text = []
|
||||
exclude_text = []
|
||||
|
||||
return MockSettings()
|
||||
|
||||
Reference in New Issue
Block a user