From 46bb63448ec01fa3845aa560f9c22a5eae3ab240 Mon Sep 17 00:00:00 2001 From: Manu Date: Thu, 13 Aug 2026 08:26:53 +0200 Subject: [PATCH] Split user flow init and data submission in playstation_network config flow tests (#179024) --- tests/components/playstation_network/test_config_flow.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/components/playstation_network/test_config_flow.py b/tests/components/playstation_network/test_config_flow.py index ff5eb37bd846..a12c512405ab 100644 --- a/tests/components/playstation_network/test_config_flow.py +++ b/tests/components/playstation_network/test_config_flow.py @@ -173,8 +173,15 @@ async def test_parse_npsso_token_failures( result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, - data={CONF_NPSSO: NPSSO_TOKEN_INVALID_JSON}, ) + assert result["type"] is FlowResultType.FORM + assert result["errors"] == {} + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + {CONF_NPSSO: NPSSO_TOKEN_INVALID_JSON}, + ) + assert result["errors"] == {"base": "invalid_account"} mock_psnawp_npsso.side_effect = lambda token: token