'Try to connect at 127.0.0.1:5000 with socket error.'

@patch('homeassistant.components.pilight._LOGGER.error')
def test_connection_failed_error(self, mock_error):

    with assert_setup_component(4):
        with patch('pilight.pilight.Client', side_effect=socket.error) as mock_client:
            self.assertFalse(setup_component(self.hass, pilight.DOMAIN, {pilight.DOMAIN: {}}))
            mock_client.assert_called_once_with(host=pilight.DEFAULT_HOST, port=pilight.DEFAULT_PORT)
            self.assertEqual(1, mock_error.call_count)
