Add password support (#12525)

This commit is contained in:
Pascal Vizeli authored and Paulus Schoutsen committed 2018-02-19 14:49:52 -08:00
1 parent eec3bad94f
commit f3748cc4fa
2 files changed
+9 -2

No files matched your search

+6 -2
View File
@@ -276,12 +276,13 @@ def test_service_calls(hassio_env, hass, aioclient_mock):
yield from hass.services.async_call('hassio', 'snapshot_partial', {
'addons': ['test'],
'folders': ['ssl'],
'password': "123456",
})
yield from hass.async_block_till_done()
assert aioclient_mock.call_count == 8
assert aioclient_mock.mock_calls[-1][2] == {
'addons': ['test'], 'folders': ['ssl']}
'addons': ['test'], 'folders': ['ssl'], 'password': "123456"}
yield from hass.services.async_call('hassio', 'restore_full', {
'snapshot': 'test',
@@ -291,12 +292,15 @@ def test_service_calls(hassio_env, hass, aioclient_mock):
'homeassistant': False,
'addons': ['test'],
'folders': ['ssl'],
'password': "123456",
})
yield from hass.async_block_till_done()
assert aioclient_mock.call_count == 10
assert aioclient_mock.mock_calls[-1][2] == {
'addons': ['test'], 'folders': ['ssl'], 'homeassistant': False}
'addons': ['test'], 'folders': ['ssl'], 'homeassistant': False,
'password': "123456"
}
@asyncio.coroutine