Add google hangouts manual authentication option (#22158)
* Added option to use manual authentication for google hangout component See: https://hangups.readthedocs.io/en/latest/user_guide.html#logging-in for manual log in example Bumped up version of hangups to 0.4.9 * Updated components/hangouts/strings.json and generated translation string by running script/translations_develop Reduced verbosity of modifications to components/hangouts/config_flow.py * Added option to use manual authentication for google hangout component See: https://hangups.readthedocs.io/en/latest/user_guide.html#logging-in for manual log in example Bumped up version of hangups to 0.4.9 * Updated components/hangouts/strings.json and generated translation string by running script/translations_develop Reduced verbosity of modifications to components/hangouts/config_flow.py * fixing missing rebase
This commit is contained in:
1 parent
879967bed2
commit
b3e60df82a
7 files changed
+57
-10
No files matched your search
@@ -19,6 +19,20 @@ async def test_flow_works(hass, aioclient_mock):
|
||||
assert result['title'] == 'test@test.com'
|
||||
|
||||
|
||||
async def test_flow_works_with_authcode(hass, aioclient_mock):
|
||||
"""Test config flow without 2fa."""
|
||||
flow = config_flow.HangoutsFlowHandler()
|
||||
|
||||
flow.hass = hass
|
||||
|
||||
with patch('hangups.get_auth'):
|
||||
result = await flow.async_step_user(
|
||||
{'email': 'test@test.com', 'password': '1232456',
|
||||
'authorization_code': 'c29tZXJhbmRvbXN0cmluZw=='})
|
||||
assert result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
|
||||
assert result['title'] == 'test@test.com'
|
||||
|
||||
|
||||
async def test_flow_works_with_2fa(hass, aioclient_mock):
|
||||
"""Test config flow with 2fa."""
|
||||
from homeassistant.components.hangouts.hangups_utils import Google2FAError
|
||||
|
||||
Reference in new issue
Block a user