-
Notifications
You must be signed in to change notification settings - Fork 13
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
New oven #62
New oven #62
Conversation
Signed-off-by: Adrian Lasota <[email protected]>
Signed-off-by: Adrian Lasota <[email protected]>
tests/test_appliancesmanager.py
Outdated
} | ||
auth = Auth(BACKEND_SELECTOR_MOCK, "email", "secretpass", http_client_mock.session) | ||
am = AppliancesManager(BACKEND_SELECTOR_MOCK, auth, http_client_mock.session) | ||
am._add_appliance(appliance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to avoid using internal class methods in the tests.
Can we switch this to use only external stuff (in this case probably http_client_mock
and am.fetch_appliances()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll do that, but I focused on unit testing this specific method only ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just extended actual unittest about oven
tests/test_appliancesmanager.py
Outdated
async def test_add_appliance(data_model_key, http_client_mock: AiohttpClientMocker): | ||
appliance = { | ||
"DATA_MODEL_KEY": f"{data_model_key}", | ||
"CATEGORY_NAME": "Cooking", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this data to the data/owned_appliances.json file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Added new data model entry for oven Signed-off-by: Adrian Lasota <[email protected]> Signed-off-by: Adrian Lasota <[email protected]>
@abmantis could you review? |
Thanks! |
@abmantis could we release this change? I'm going to add support in HA core |
@adrianlasota I've just released v0.18.9 that includes this. |
@abmantis Added support for new oven: W7I HT58 T