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

tests: replace custom MockConfigEntry with the official hass.MockConfigEntry #105

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

palazzem
Copy link
Owner

@palazzem palazzem commented Nov 3, 2023

Related Issues

n/a

Proposed Changes:

Instead of using our own MockConfigEntry, we're using the one provided directly from HA. It behaves exactly as the original one, with the only difference that we remove the MappingProxyType mapping (read-only protection) as we want to override values during tests.

This change is required to use config_entry fixture while testing our OptionsFlow.

Testing:

n/a

Extra Notes (optional):

n/a

Checklist

  • Related issues and proposed changes are filled
  • Tests are defining the correct and expected behavior
  • Code is well-documented via docstrings

@palazzem palazzem added this to the 2.2.0 milestone Nov 3, 2023
@palazzem palazzem self-assigned this Nov 3, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6747972151

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.085%

Totals Coverage Status
Change from base Build 6746931046: 0.0%
Covered Lines: 476
Relevant Lines: 537

💛 - Coveralls

@palazzem palazzem merged commit 95cc159 into main Nov 3, 2023
@palazzem palazzem deleted the palazzem/mock-config-entry branch November 3, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants