Fix songpal test_setup_failed test (#95712)

This commit is contained in:
Jan Bouwhuis 2023-07-02 16:32:43 +02:00 committed by GitHub
parent 86912d2409
commit b314e2b1a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,8 +103,8 @@ async def test_setup_failed(
await hass.async_block_till_done() await hass.async_block_till_done()
all_states = hass.states.async_all() all_states = hass.states.async_all()
assert len(all_states) == 0 assert len(all_states) == 0
warning_records = [x for x in caplog.records if x.levelno == logging.WARNING] assert "[name(http://0.0.0.0:10000/sony)] Unable to connect" in caplog.text
assert len(warning_records) == 2 assert "Platform songpal not ready yet: Unable to do POST request" in caplog.text
assert not any(x.levelno == logging.ERROR for x in caplog.records) assert not any(x.levelno == logging.ERROR for x in caplog.records)
caplog.clear() caplog.clear()