Fix broad-exception-raised in component tests (#119467)

This commit is contained in:
epenet
2024-06-12 17:53:42 +02:00
committed by GitHub
parent aaa674955c
commit 3d1165519d
9 changed files with 9 additions and 9 deletions
@@ -71,7 +71,7 @@ def get_suggested(schema, key):
return None
return k.description["suggested_value"]
# Wanted key absent from schema
raise Exception
raise KeyError("Wanted key absent from schema")
@pytest.mark.parametrize("platform", ["sensor"])
+1 -1
View File
@@ -205,7 +205,7 @@ def get_suggested(schema, key):
return None
return k.description["suggested_value"]
# Wanted key absent from schema
raise Exception
raise KeyError("Wanted key absent from schema")
@pytest.mark.parametrize(
@@ -164,7 +164,7 @@ def get_suggested(schema, key):
return None
return k.description["suggested_value"]
# Wanted key absent from schema
raise Exception
raise KeyError("Wanted key absent from schema")
@patch(
@@ -75,7 +75,7 @@ def get_suggested(schema, key):
return None
return k.description["suggested_value"]
# Wanted key absent from schema
raise Exception
raise KeyError("Wanted key absent from schema")
@pytest.mark.parametrize("platform", ["sensor"])
+1 -1
View File
@@ -63,7 +63,7 @@ def get_suggested(schema, key):
return None
return k.description["suggested_value"]
# Wanted key absent from schema
raise Exception
raise KeyError("Wanted key absent from schema")
@pytest.mark.parametrize("platform", ["sensor"])
@@ -130,7 +130,7 @@ def get_suggested(schema, key):
return None
return k.description["suggested_value"]
# Wanted key absent from schema
raise Exception
raise KeyError("Wanted key absent from schema")
@pytest.mark.parametrize(
@@ -93,7 +93,7 @@ def get_suggested(schema, key):
return None
return k.description["suggested_value"]
# Wanted key absent from schema
raise Exception
raise KeyError("Wanted key absent from schema")
async def test_options(hass: HomeAssistant) -> None:
+1 -1
View File
@@ -63,7 +63,7 @@ def get_suggested(schema, key):
return None
return k.description["suggested_value"]
# Wanted key absent from schema
raise Exception
raise KeyError("Wanted key absent from schema")
@pytest.mark.freeze_time("2022-03-16 17:37:00", tz_offset=-7)
@@ -261,7 +261,7 @@ def get_suggested(schema, key):
return None
return k.description["suggested_value"]
# Wanted key absent from schema
raise Exception
raise KeyError("Wanted key absent from schema")
async def test_options(hass: HomeAssistant) -> None: