Files
gallery/tests/test_matchtv_api.py
T

24 lines
661 B
Python

import datetime
import pytest
from gallery.painting.matchtv.api import MatchTvApi
from tests.common.mock import create_mock_api
from tests.data.matchtv import MATCHTV_MOCK_SOURCE
@pytest.fixture(name="matchtv_api", scope="module")
def matchtv_api_fixture() -> MatchTvApi:
return create_mock_api(MatchTvApi, MATCHTV_MOCK_SOURCE)
async def test_search(matchtv_api: MatchTvApi):
result = await matchtv_api.find_channels("матч")
assert len(result) == 6
async def test_channel(matchtv_api: MatchTvApi):
result = await matchtv_api.get_schedule("test", datetime.date.today())
assert result is not None
assert len(result.values) > 0