'Test if an error is logged for non zero exit codes.'

@patch('homeassistant.components.notify.command_line._LOGGER.error')
def test_error_for_none_zero_exit_code(self, mock_error):

    with assert_setup_component(1) as handle_config:
        self.assertTrue(setup_component(self.hass, notify.DOMAIN, {'notify': {'name': 'test', 'platform': 'command_line', 'command': 'echo    $(cat);    exit    1'}}))
    assert handle_config[notify.DOMAIN]
    self.assertTrue(self.hass.services.call('notify', 'test', {'message': 'error'}, blocking=True))
    self.assertEqual(1, mock_error.call_count)
