mirror of
https://github.com/home-assistant/core.git
synced 2026-04-02 16:36:08 +01:00
25 lines
696 B
Python
25 lines
696 B
Python
"""Fixtures for Met Office weather integration tests."""
|
|
|
|
from unittest.mock import patch
|
|
|
|
from datapoint.exceptions import APIException
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def mock_simple_manager_fail():
|
|
"""Mock datapoint Manager with default values for testing in config_flow."""
|
|
with patch(
|
|
"homeassistant.components.metoffice.config_flow.Manager"
|
|
) as mock_manager:
|
|
instance = mock_manager.return_value
|
|
instance.get_forecast = APIException()
|
|
instance.latitude = None
|
|
instance.longitude = None
|
|
instance.site = None
|
|
instance.site_id = None
|
|
instance.site_name = None
|
|
instance.now = None
|
|
|
|
yield mock_manager
|