Drop asynctest (#44746)

This commit is contained in:
Franck Nijhof 2021-01-01 22:31:56 +01:00 committed by GitHub
parent 2b0556520b
commit 65cf2fcb6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
906 changed files with 1360 additions and 1254 deletions

View file

@ -1,5 +1,7 @@
"""The tests for the Group Light platform."""
from os import path
import unittest.mock
from unittest.mock import MagicMock, patch
from homeassistant import config as hass_config
from homeassistant.components.group import DOMAIN, SERVICE_RELOAD
@ -31,9 +33,6 @@ from homeassistant.const import (
)
from homeassistant.setup import async_setup_component
import tests.async_mock
from tests.async_mock import MagicMock, patch
async def test_default_state(hass):
"""Test light group default state."""
@ -603,7 +602,7 @@ async def test_invalid_service_calls(hass):
grouped_light = add_entities.call_args[0][0][0]
grouped_light.hass = hass
with tests.async_mock.patch.object(hass.services, "async_call") as mock_call:
with unittest.mock.patch.object(hass.services, "async_call") as mock_call:
await grouped_light.async_turn_on(brightness=150, four_oh_four="404")
data = {ATTR_ENTITY_ID: ["light.test1", "light.test2"], ATTR_BRIGHTNESS: 150}
mock_call.assert_called_once_with(