Improve Plex media_player entity naming (#31755)

This commit is contained in:
jjlawren 2020-02-12 11:55:18 -06:00 committed by GitHub
parent 8498ca37cd
commit 1b2f4fa19f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 13 deletions

View file

@ -53,6 +53,15 @@ class MockPlexAccount:
return self._resources
class MockPlexSystemAccount:
"""Mock a PlexSystemAccount instance."""
def __init__(self):
"""Initialize the object."""
self.name = "Dummy"
self.accountID = 1
class MockPlexServer:
"""Mock a PlexServer instance."""
@ -68,6 +77,11 @@ class MockPlexServer:
]
prefix = "https" if ssl else "http"
self._baseurl = f"{prefix}://{host}:{port}"
self._systemAccount = MockPlexSystemAccount()
def systemAccounts(self):
"""Mock the systemAccounts lookup method."""
return [self._systemAccount]
@property
def url_in_use(self):