Enable Ruff B017 (#115335)

This commit is contained in:
Sid 2024-04-15 22:25:09 +02:00 committed by GitHub
parent c7e6f3696f
commit 5f055a64bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 11 deletions

View file

@ -370,9 +370,9 @@ async def test_remove_entry_installedapp_unknown_error(
) -> None:
"""Test raises exceptions removing the installed app."""
# Arrange
smartthings_mock.delete_installed_app.side_effect = Exception
smartthings_mock.delete_installed_app.side_effect = ValueError
# Act
with pytest.raises(Exception):
with pytest.raises(ValueError):
await smartthings.async_remove_entry(hass, config_entry)
# Assert
assert smartthings_mock.delete_installed_app.call_count == 1
@ -403,9 +403,9 @@ async def test_remove_entry_app_unknown_error(
) -> None:
"""Test raises exceptions removing the app."""
# Arrange
smartthings_mock.delete_app.side_effect = Exception
smartthings_mock.delete_app.side_effect = ValueError
# Act
with pytest.raises(Exception):
with pytest.raises(ValueError):
await smartthings.async_remove_entry(hass, config_entry)
# Assert
assert smartthings_mock.delete_installed_app.call_count == 1