Update pylint to 2.9.5 (#53496)
This commit is contained in:
parent
af8f594939
commit
46c3495ae0
10 changed files with 16 additions and 26 deletions
|
@ -61,10 +61,7 @@ async def test_config_not_valid_service_names(hass):
|
|||
)
|
||||
|
||||
|
||||
@patch(
|
||||
"homeassistant.components.shell_command.asyncio.subprocess"
|
||||
".create_subprocess_shell"
|
||||
)
|
||||
@patch("homeassistant.components.shell_command.asyncio.create_subprocess_shell")
|
||||
async def test_template_render_no_template(mock_call, hass):
|
||||
"""Ensure shell_commands without templates get rendered properly."""
|
||||
mock_call.return_value = mock_process_creator(error=False)
|
||||
|
@ -84,10 +81,7 @@ async def test_template_render_no_template(mock_call, hass):
|
|||
assert cmd == "ls /bin"
|
||||
|
||||
|
||||
@patch(
|
||||
"homeassistant.components.shell_command.asyncio.subprocess"
|
||||
".create_subprocess_exec"
|
||||
)
|
||||
@patch("homeassistant.components.shell_command.asyncio.create_subprocess_exec")
|
||||
async def test_template_render(mock_call, hass):
|
||||
"""Ensure shell_commands with templates get rendered properly."""
|
||||
hass.states.async_set("sensor.test_state", "Works")
|
||||
|
@ -111,10 +105,7 @@ async def test_template_render(mock_call, hass):
|
|||
assert ("ls", "/bin", "Works") == cmd
|
||||
|
||||
|
||||
@patch(
|
||||
"homeassistant.components.shell_command.asyncio.subprocess"
|
||||
".create_subprocess_shell"
|
||||
)
|
||||
@patch("homeassistant.components.shell_command.asyncio.create_subprocess_shell")
|
||||
@patch("homeassistant.components.shell_command._LOGGER.error")
|
||||
async def test_subprocess_error(mock_error, mock_call, hass):
|
||||
"""Test subprocess that returns an error."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue