1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add type hints for requests_mock.Mocker in test fixtures (#118678)

This commit is contained in:
epenet
2024-06-03 10:30:08 +02:00
committed by GitHub
parent 9be972b13e
commit 6cf7889c38
3 changed files with 6 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ from unittest.mock import AsyncMock, patch
from jaraco.abode.helpers import urls as URL
import pytest
from requests_mock import Mocker
from tests.common import load_fixture
from tests.components.light.conftest import mock_light_profiles # noqa: F401
@@ -20,7 +21,7 @@ def mock_setup_entry() -> Generator[AsyncMock, None, None]:
@pytest.fixture(autouse=True)
def requests_mock_fixture(requests_mock) -> None:
def requests_mock_fixture(requests_mock: Mocker) -> None:
"""Fixture to provide a requests mocker."""
# Mocks the login response for abodepy.
requests_mock.post(URL.LOGIN, text=load_fixture("login.json", "abode"))