Fix credentials lookup (#15409)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2018-07-10 20:33:03 +02:00
1 parent fd568d77c7
commit 1f6331c69d
2 files changed
+16 -4

No files matched your search

+15
View File
@@ -94,6 +94,21 @@ async def test_login_as_existing_user(mock_hass):
}])
ensure_auth_manager_loaded(manager)
# Add a fake user that we're not going to log in with
user = MockUser(
id='mock-user2',
is_owner=False,
is_active=False,
name='Not user',
).add_to_auth_manager(manager)
user.credentials.append(auth.Credentials(
id='mock-id2',
auth_provider_type='insecure_example',
auth_provider_id=None,
data={'username': 'other-user'},
is_new=False,
))
# Add fake user with credentials for example auth provider.
user = MockUser(
id='mock-user',