Abort reauth flows on config entry reload (#140931)
* Abort reauth flows on config entry reload * Don't cancel reauth when reload is triggered by a reauth flow * Revert "Don't cancel reauth when reload is triggered by a reauth flow" This reverts commit f37c75621e99d4c160c2c4adc9b36e52e4cc81ec. * Don't fail in FlowManager._async_handle_step when the flow was aborted * Update tplink config flow * Add tests * Don't allow create_entry from an aborted flow * Add comment * Adjust after merge with dev
This commit is contained in:
@@ -219,8 +219,8 @@ async def test_abort_aborted_flow(manager: MockFlowManager) -> None:
|
||||
manager.async_abort(self.flow_id)
|
||||
return self.async_abort(reason="blah")
|
||||
|
||||
with pytest.raises(data_entry_flow.UnknownFlow):
|
||||
await manager.async_init("test")
|
||||
form = await manager.async_init("test")
|
||||
assert form["reason"] == "blah"
|
||||
assert len(manager.async_progress()) == 0
|
||||
assert len(manager.mock_created_entries) == 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user