eat(yandexweather): add yandexweather api

This commit is contained in:
2026-08-24 22:51:30 +03:00
parent a92b63b855
commit 571fef9de1
33 changed files with 506 additions and 74 deletions
+2 -9
View File
@@ -3,20 +3,13 @@ import datetime
import pytest
from gallery.painting.openweather.api import OpenWeatherApi
from gallery.painting.openweather.openweather import OpenWeather
from tests.common.mock import create_mock_api
from tests.data.openweather import OPENWEATHER_MOCK_SOURCE
@pytest.fixture(name="openweather_api", scope="module")
def openweather_api_fixture() -> OpenWeatherApi:
class MockOpenWeather(OpenWeather):
def __init__(self):
super().__init__("")
self._source = OPENWEATHER_MOCK_SOURCE
api = OpenWeatherApi()
api.SOURCE = MockOpenWeather()
return api
return create_mock_api(OpenWeatherApi, OPENWEATHER_MOCK_SOURCE)
async def test_search(openweather_api: OpenWeatherApi):