Convert MetOffice to use UI for configuration (#34900)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
1 parent
9a867cbb75
commit
c96458c7e4
19 files changed
+2602
-227
No files matched your search
@@ -0,0 +1,22 @@
|
||||
"""Fixtures for Met Office weather integration tests."""
|
||||
from datapoint.exceptions import APIException
|
||||
import pytest
|
||||
|
||||
from tests.async_mock import patch
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def mock_simple_manager_fail():
|
||||
"""Mock datapoint Manager with default values for testing in config_flow."""
|
||||
with patch("datapoint.Manager") as mock_manager:
|
||||
instance = mock_manager.return_value
|
||||
instance.get_nearest_forecast_site.side_effect = APIException()
|
||||
instance.get_forecast_for_site.side_effect = APIException()
|
||||
instance.latitude = None
|
||||
instance.longitude = None
|
||||
instance.site = None
|
||||
instance.site_id = None
|
||||
instance.site_name = None
|
||||
instance.now = None
|
||||
|
||||
yield mock_manager
|
||||
Reference in new issue
Block a user