* Added a new weather integration - Met Éireann * Fix codespell error * Update met_eireann to use CoordinatorEntity * Remove deprecated platform setup * Fix merge conflict * Remove unnecessary onboarding/home tracking code * Use common strings for config flow * Remove unnecessary code * Switch to using unique IDs in config flow * Use constants where possible * Fix failing tests * Fix isort errors * Remove unnecessary DataUpdateCoordinator class * Add device info * Explicitly define forecast data * Disable hourly forecast entity by default * Update config flow to reflect requested changes * Cleanup code * Update entity naming to match other similar components * Convert forecast time to UTC * Fix test coverage * Update test coverage * Remove elevation conversion * Update translations for additional clarity * Remove en-GB translation
22 lines
659 B
Python
22 lines
659 B
Python
"""Fixtures for Met Éireann weather testing."""
|
|
from unittest.mock import AsyncMock, patch
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def mock_weather():
|
|
"""Mock weather data."""
|
|
with patch("meteireann.WeatherData") as mock_data:
|
|
mock_data = mock_data.return_value
|
|
mock_data.fetching_data = AsyncMock(return_value=True)
|
|
mock_data.get_current_weather.return_value = {
|
|
"condition": "Cloud",
|
|
"temperature": 15,
|
|
"pressure": 100,
|
|
"humidity": 50,
|
|
"wind_speed": 10,
|
|
"wind_bearing": "NE",
|
|
}
|
|
mock_data.get_forecast.return_value = {}
|
|
yield mock_data
|