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

Enable Ruff PT013 (#86757)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Franck Nijhof
2023-01-27 09:09:46 +01:00
committed by GitHub
parent bd9a8ba6f1
commit e4a78420b8
50 changed files with 528 additions and 504 deletions

View File

@@ -2,7 +2,7 @@
from unittest.mock import create_autospec, patch
from haphilipsjs import PhilipsTV
from pytest import fixture
import pytest
from homeassistant.components.philips_js.const import DOMAIN
@@ -11,12 +11,12 @@ from . import MOCK_CONFIG, MOCK_ENTITY_ID, MOCK_NAME, MOCK_SERIAL_NO, MOCK_SYSTE
from tests.common import MockConfigEntry, mock_device_registry
@fixture(autouse=True)
@pytest.fixture(autouse=True)
async def setup_notification(hass):
"""Configure notification system."""
@fixture(autouse=True)
@pytest.fixture(autouse=True)
def mock_tv():
"""Disable component actual use."""
tv = create_autospec(PhilipsTV)
@@ -42,7 +42,7 @@ def mock_tv():
yield tv
@fixture
@pytest.fixture
async def mock_config_entry(hass):
"""Get standard player."""
config_entry = MockConfigEntry(
@@ -52,13 +52,13 @@ async def mock_config_entry(hass):
return config_entry
@fixture
@pytest.fixture
def mock_device_reg(hass):
"""Get standard device."""
return mock_device_registry(hass)
@fixture
@pytest.fixture
async def mock_entity(hass, mock_device_reg, mock_config_entry):
"""Get standard player."""
assert await hass.config_entries.async_setup(mock_config_entry.entry_id)
@@ -66,7 +66,7 @@ async def mock_entity(hass, mock_device_reg, mock_config_entry):
return MOCK_ENTITY_ID
@fixture
@pytest.fixture
def mock_device(hass, mock_device_reg, mock_entity, mock_config_entry):
"""Get standard device."""
return mock_device_reg.async_get_or_create(