feat(weather): add weather location search
This commit is contained in:
@@ -3,18 +3,14 @@ import datetime
|
||||
import pytest
|
||||
|
||||
from gallery.painting.matchtv.api import MatchTvApi
|
||||
from gallery.painting.matchtv.mock import MATCHTV_MOCK_DATA
|
||||
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:
|
||||
class MockSource:
|
||||
async def request(self, endpoint: str):
|
||||
return MATCHTV_MOCK_DATA.get_html(endpoint.split("/")[1].split("?")[0])
|
||||
|
||||
api = MatchTvApi()
|
||||
api.SOURCE = MockSource()
|
||||
api.SOURCE = MATCHTV_MOCK_SOURCE
|
||||
return api
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user