Add type hints for FixtureRequest in tests (#118779)

This commit is contained in:
epenet 2024-06-04 10:37:54 +02:00 committed by GitHub
parent 16fd19f01a
commit b54a68750b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 67 additions and 36 deletions

View file

@ -1,7 +1,7 @@
"""Common fixtures and objects for the Switcher integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, Mock, patch
from unittest.mock import AsyncMock, MagicMock, Mock, patch
import pytest
@ -16,7 +16,7 @@ def mock_setup_entry() -> Generator[AsyncMock, None, None]:
@pytest.fixture
def mock_bridge(request):
def mock_bridge(request: pytest.FixtureRequest) -> Generator[MagicMock, None, None]:
"""Return a mocked SwitcherBridge."""
with (
patch(