diff --git a/tests/data/openweather/__init__.py b/tests/data/openweather/__init__.py index 748d2dd..ef06b9d 100644 --- a/tests/data/openweather/__init__.py +++ b/tests/data/openweather/__init__.py @@ -6,5 +6,6 @@ OPENWEATHER_MOCK_SOURCE = MockSource( Path(__file__).parent, { "forecast": "forecast.json", + "direct": "geo-direct.json", }, ) diff --git a/tests/data/openweather/locations.json b/tests/data/openweather/geo-direct.json similarity index 100% rename from tests/data/openweather/locations.json rename to tests/data/openweather/geo-direct.json diff --git a/tests/test_openweather_api.py b/tests/test_openweather_api.py index 31ceb21..9041633 100644 --- a/tests/test_openweather_api.py +++ b/tests/test_openweather_api.py @@ -19,6 +19,11 @@ def openweather_api_fixture() -> OpenWeatherApi: return api +async def test_search(openweather_api: OpenWeatherApi): + result = await openweather_api.find_locations("test") + assert len(result) == 5 + + async def test_day(openweather_api: OpenWeatherApi): result = await openweather_api.get_day("52.968498:36.0695", datetime.date(2024, 8, 23)) assert len(result.values) == 8