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

Upgrade pyupgrade to 2.21.2, apply its changes (#52987)

This commit is contained in:
Ville Skyttä
2021-07-19 11:46:09 +03:00
committed by GitHub
parent c96f01df1f
commit 470f2dd73f
73 changed files with 152 additions and 162 deletions

View File

@@ -223,9 +223,7 @@ async def test_report_state_all(agents):
data = {}
with patch.object(config, "async_report_state") as mock:
await config.async_report_state_all(data)
assert sorted(mock.mock_calls) == sorted(
[call(data, agent) for agent in agents]
)
assert sorted(mock.mock_calls) == sorted(call(data, agent) for agent in agents)
@pytest.mark.parametrize(
@@ -241,7 +239,7 @@ async def test_sync_entities_all(agents, result):
side_effect=lambda agent_user_id: agents[agent_user_id],
) as mock:
res = await config.async_sync_entities_all()
assert sorted(mock.mock_calls) == sorted([call(agent) for agent in agents])
assert sorted(mock.mock_calls) == sorted(call(agent) for agent in agents)
assert res == result