Cloud cognito switch (#10823)

* Allow email based cognito instance

* Fix quitting Home Assistant while reconnecting

* Lint
This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2017-11-27 10:09:17 +01:00
1 parent 1b7a64412d
commit fe0a9529ed
5 files changed
+60 -24

No files matched your search

+2 -2
View File
@@ -191,7 +191,7 @@ def test_register_view(mock_cognito, cloud_client):
assert req.status == 200
assert len(mock_cognito.register.mock_calls) == 1
result_email, result_pass = mock_cognito.register.mock_calls[0][1]
assert result_email == auth_api._generate_username('hello@bla.com')
assert result_email == 'hello@bla.com'
assert result_pass == 'falcon42'
@@ -238,7 +238,7 @@ def test_confirm_register_view(mock_cognito, cloud_client):
assert req.status == 200
assert len(mock_cognito.confirm_sign_up.mock_calls) == 1
result_code, result_email = mock_cognito.confirm_sign_up.mock_calls[0][1]
assert result_email == auth_api._generate_username('hello@bla.com')
assert result_email == 'hello@bla.com'
assert result_code == '123456'