Update pypoint to use async http requests (#41546)
* Remove domain after entities * Add support for async http-requests * Fix, handle network issues (update _is_available status) * Fix missing await for alarm_arm * Fix alarm status * Update tests to async * Bump pypoint version * Fix doc string * Apply suggestions from code review, remove pylint disable * Fix black
This commit is contained in:
1 parent
32204821c1
commit
8bdc824b6c
8 files changed
+49
-46
No files matched your search
@@ -33,11 +33,13 @@ def mock_pypoint(is_authorized): # pylint: disable=redefined-outer-name
|
||||
with patch(
|
||||
"homeassistant.components.point.config_flow.PointSession"
|
||||
) as PointSession:
|
||||
PointSession.return_value.get_access_token.return_value = {
|
||||
"access_token": "boo"
|
||||
}
|
||||
PointSession.return_value.get_access_token = AsyncMock(
|
||||
return_value={"access_token": "boo"}
|
||||
)
|
||||
PointSession.return_value.is_authorized = is_authorized
|
||||
PointSession.return_value.user.return_value = {"email": "john.doe@example.com"}
|
||||
PointSession.return_value.user = AsyncMock(
|
||||
return_value={"email": "john.doe@example.com"}
|
||||
)
|
||||
yield PointSession
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user