Fix Plex when using local tokenless authentication (#37096)
This commit is contained in:
1 parent
0698ae4850
commit
1508d7a3ac
7 files changed
+157
-84
No files matched your search
@@ -28,8 +28,8 @@ async def test_sonos_playback(hass):
|
||||
mock_plex_server = MockPlexServer(config_entry=entry)
|
||||
|
||||
with patch("plexapi.server.PlexServer", return_value=mock_plex_server), patch(
|
||||
"homeassistant.components.plex.PlexWebsocket.listen"
|
||||
):
|
||||
"plexapi.myplex.MyPlexAccount", return_value=MockPlexAccount()
|
||||
), patch("homeassistant.components.plex.PlexWebsocket.listen"):
|
||||
entry.add_to_hass(hass)
|
||||
assert await hass.config_entries.async_setup(entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
@@ -37,10 +37,6 @@ async def test_sonos_playback(hass):
|
||||
server_id = mock_plex_server.machineIdentifier
|
||||
loaded_server = hass.data[DOMAIN][SERVERS][server_id]
|
||||
|
||||
with patch("plexapi.myplex.MyPlexAccount", return_value=MockPlexAccount()):
|
||||
# Access and cache PlexAccount
|
||||
assert loaded_server.account
|
||||
|
||||
# Test Sonos integration lookup failure
|
||||
with patch.object(
|
||||
hass.components.sonos, "get_coordinator_id", side_effect=HomeAssistantError
|
||||
|
||||
Reference in new issue
Block a user