Small improvement to Withings tests (#86937)

This commit is contained in:
Franck Nijhof
2023-01-30 11:03:42 +01:00
committed by GitHub
parent c56832bb2c
commit a4fa0925b7

View File

@@ -34,11 +34,8 @@ def config_schema_validate(withings_config) -> dict:
def config_schema_assert_fail(withings_config) -> None: def config_schema_assert_fail(withings_config) -> None:
"""Assert a schema config will fail.""" """Assert a schema config will fail."""
try: with pytest.raises(vol.MultipleInvalid):
config_schema_validate(withings_config) config_schema_validate(withings_config)
pytest.fail("This line should not have run.")
except vol.error.MultipleInvalid:
assert True
def test_config_schema_basic_config() -> None: def test_config_schema_basic_config() -> None: