Fix unbound var and tests in PlayStation Network integration (#147398)

fix unbound var and test mocks
This commit is contained in:
Manu
2025-06-24 08:53:45 +02:00
committed by GitHub
parent eff35e93bd
commit 121239bcf7
4 changed files with 7 additions and 11 deletions

View File

@@ -97,12 +97,9 @@ def mock_psnawp_npsso(mock_user: MagicMock) -> Generator[MagicMock]:
"""Mock psnawp_api."""
with patch(
"psnawp_api.utils.misc.parse_npsso_token",
autospec=True,
) as mock_parse_npsso_token:
npsso = mock_parse_npsso_token.return_value
npsso.parse_npsso_token.return_value = NPSSO_TOKEN
"homeassistant.components.playstation_network.config_flow.parse_npsso_token",
side_effect=lambda token: token,
) as npsso:
yield npsso