Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Increase test coverage for samsungtv component #14900

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

Merged
merged 1 commit into from
Jun 12, 2018

Conversation

ejel
Copy link
Contributor

@ejel ejel commented Jun 9, 2018

Description:

More test cases to cover retry logic added in PR #14587.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

@ghost ghost added the in progress label Jun 9, 2018
self.device.send_key(command)
self.assertEqual(STATE_ON, self.device._state)
# verify that _remote.control() get called twice because of retry logic
_remote.assert_has_calls([
Copy link
Member

Choose a reason for hiding this comment

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

We prefer to use assert statement and mock.call_args, to avoid a test passing despite error if assert_has_calls is misspelled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good to know. I updated my PR with the suggested change.

More test cases to cover retry logic added in 58a1c38
@MartinHjelmare MartinHjelmare merged commit be4776d into home-assistant:dev Jun 12, 2018
@ghost ghost removed the in progress label Jun 12, 2018
@balloob balloob mentioned this pull request Jun 22, 2018
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
More test cases to cover retry logic added in 58a1c38
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants