Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plex tests cleanup and additions #37117

Merged
merged 1 commit into from
Jun 26, 2020

Conversation

jjlawren
Copy link
Contributor

Proposed change

  • Remove commented out tests which were failing in 3.8 (Use built-in test helpers on 3.8 #34901).
  • Add tests to complete test coverage for unskipped files.
  • Remove unnecessary method found during testing.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

def trigger_plex_update(hass, plex_server):
"""Call the websocket callback method."""
server_id = plex_server.machineIdentifier
websocket = hass.data[DOMAIN][WEBSOCKETS][server_id]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to patch the websocket and get access to the callback via the patch call and then call the callback to trigger an update. We don't want to use integration details like this in the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #37147

@jjlawren jjlawren deleted the plex_tests_cleanup branch June 26, 2020 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants