Enable Ruff B017 (#115335)
This commit is contained in:
parent
c7e6f3696f
commit
5f055a64bb
6 changed files with 16 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue