core/tests/components/smhi/conftest.py

26 lines
591 B
Python
Raw Normal View History

2021-05-15 18:22:32 +00:00
"""Provide common smhi fixtures."""
2021-05-15 18:22:32 +00:00
import pytest
from homeassistant.components.smhi.const import DOMAIN
2021-05-15 18:22:32 +00:00
from tests.common import load_fixture
@pytest.fixture(scope="package")
2021-05-15 18:22:32 +00:00
def api_response():
"""Return an API response."""
return load_fixture("smhi.json", DOMAIN)
2024-05-22 14:03:48 +00:00
@pytest.fixture(scope="package")
def api_response_night():
"""Return an API response for night only."""
return load_fixture("smhi_night.json", DOMAIN)
@pytest.fixture(scope="package")
def api_response_lack_data():
"""Return an API response."""
return load_fixture("smhi_short.json", DOMAIN)