Allow load_verify_locations with only cadata passed (#133299)

This commit is contained in:
Michael
2024-12-15 19:26:46 +01:00
committed by GitHub
parent 2a49378f4c
commit e951511132
2 changed files with 13 additions and 1 deletions

View File

@@ -429,6 +429,12 @@ async def test_protect_loop_load_verify_locations(
context.load_verify_locations("/dev/null")
assert "Detected blocking call to load_verify_locations" in caplog.text
# ignore with only cadata
caplog.clear()
with pytest.raises(ssl.SSLError):
context.load_verify_locations(cadata="xxx")
assert "Detected blocking call to load_verify_locations" not in caplog.text
async def test_protect_loop_load_cert_chain(
hass: HomeAssistant, caplog: pytest.LogCaptureFixture