'Call a rest command with aiohttp exception.'

def test_rest_command_aiohttp_error(self, aioclient_mock):

    with assert_setup_component(4):
        setup_component(self.hass, rc.DOMAIN, self.config)
    aioclient_mock.get(self.url, exc=aiohttp.ClientError())
    self.hass.services.call(rc.DOMAIN, 'get_test', {})
    self.hass.block_till_done()
    assert (len(aioclient_mock.mock_calls) == 1)
