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

test: Fix tests #753

Merged
merged 1 commit into from
Oct 29, 2023
Merged

test: Fix tests #753

merged 1 commit into from
Oct 29, 2023

Conversation

functionpointer
Copy link
Contributor

Fix the tests!

Most tests just had a broken hass.services.async_call.
hass.services.async_call no longer returns a boolean, as documented here:
https://developers.home-assistant.io/blog/2023/06/14/service-calls/
Fix: just don't look at the return value anymore.

However, some tests fail due to mismatch in mock data and teslajsonpy and/or extraction code in sensor.py.
I have fixed them by modifying the mock data.

Not sure if that is the correct approach. Are there recent examples of SolarPowerwallSite responses?

hass.services.async_call no longer returns a boolean, as documented here:
https://developers.home-assistant.io/blog/2023/06/14/service-calls/

Also add some keys to the mock data.
@functionpointer functionpointer changed the title Fix tests test: Fix tests Oct 28, 2023
@alandtse
Copy link
Owner

Thanks for doing that. Modifying mock is fine as long as they actually logically make sense still as a test.

@alandtse alandtse merged commit 7c1adca into alandtse:dev Oct 29, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants