feat: add include_text and exclude_text filters to settings and playlist tests
CI/CD Pipeline / test-and-lint (push) Successful in 25s
CI/CD Pipeline / publish-container (push) Has been skipped
CI/CD Pipeline / test-and-lint (pull_request) Successful in 33s
CI/CD Pipeline / publish-container (pull_request) Has been skipped

This commit is contained in:
2026-02-02 16:28:51 +00:00
parent 757ed91aae
commit c1d9b6bf54
3 changed files with 552 additions and 0 deletions
+51
View File
@@ -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()