Enable Ruff SIM117 (#86783)

This commit is contained in:
Franck Nijhof 2023-01-27 11:52:49 +01:00 committed by GitHub
parent 57cf11f067
commit a79885ceaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 441 additions and 453 deletions

View file

@ -192,11 +192,10 @@ async def test_reauthentication(
},
)
with patch("homeassistant.components.yolink.api.ConfigEntryAuth"):
with patch(
"homeassistant.components.yolink.async_setup_entry", return_value=True
) as mock_setup:
result = await hass.config_entries.flow.async_configure(result["flow_id"])
with patch("homeassistant.components.yolink.api.ConfigEntryAuth"), patch(
"homeassistant.components.yolink.async_setup_entry", return_value=True
) as mock_setup:
result = await hass.config_entries.flow.async_configure(result["flow_id"])
token_data = old_entry.data["token"]
assert token_data["access_token"] == "mock-access-token"
assert token_data["refresh_token"] == "mock-refresh-token"