test(openweather): add openweather location seacrh test
This commit is contained in:
@@ -6,5 +6,6 @@ OPENWEATHER_MOCK_SOURCE = MockSource(
|
|||||||
Path(__file__).parent,
|
Path(__file__).parent,
|
||||||
{
|
{
|
||||||
"forecast": "forecast.json",
|
"forecast": "forecast.json",
|
||||||
|
"direct": "geo-direct.json",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ def openweather_api_fixture() -> OpenWeatherApi:
|
|||||||
return api
|
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):
|
async def test_day(openweather_api: OpenWeatherApi):
|
||||||
result = await openweather_api.get_day("52.968498:36.0695", datetime.date(2024, 8, 23))
|
result = await openweather_api.get_day("52.968498:36.0695", datetime.date(2024, 8, 23))
|
||||||
assert len(result.values) == 8
|
assert len(result.values) == 8
|
||||||
|
|||||||
Reference in New Issue
Block a user