Also test unique ID in config flow test for APCUPSD (#150362)

This commit is contained in:
Yuxin Wang
2025-08-09 19:49:25 -10:00
committed by GitHub
parent 084cde6ecf
commit 2c36a74da5
2 changed files with 1 additions and 1 deletions

View File

@@ -13,7 +13,6 @@ rules:
Consider looking into making a `mock_setup_entry` fixture that just automatically do this.
`test_config_flow_cannot_connect`: Needs to end in CREATE_ENTRY to test that its able to recover.
`test_config_flow_duplicate`: this test should be split in 2, one for testing duplicate host/port and one for duplicate serial number.
`test_flow_works`: Should also test unique id.
config-flow: done
dependency-transparency: done
docs-actions:

View File

@@ -123,6 +123,7 @@ async def test_flow_works(hass: HomeAssistant) -> None:
assert result["type"] is FlowResultType.CREATE_ENTRY
assert result["title"] == MOCK_STATUS["UPSNAME"]
assert result["data"] == CONF_DATA
assert result["result"].unique_id == MOCK_STATUS["SERIALNO"]
mock_setup.assert_called_once()