mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 03:35:09 +02:00
Fix unbound var and tests in PlayStation Network integration (#147398)
fix unbound var and test mocks
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user