import datetime import pytest from gallery.painting.matchtv.api import MatchTvApi from gallery.sketch.schedule.model import ChannelId from tests.data.matchtv import MATCHTV_MOCK_SOURCE @pytest.fixture(name="matchtv_api", scope="module") def matchtv_api_fixture() -> MatchTvApi: api = MatchTvApi() api.SOURCE = MATCHTV_MOCK_SOURCE return api async def test_channel(matchtv_api: MatchTvApi): result = await matchtv_api.get_channel_schedule( ChannelId.TEST, datetime.date.today() ) assert result is not None assert len(result.values) > 0