'Try to send data without protocol information, should give error.'

@patch('pilight.pilight.Client', PilightDaemonSim)
@patch('homeassistant.core._LOGGER.error')
@patch('tests.components.test_pilight._LOGGER.error')
def test_send_code_no_protocol(self, mock_pilight_error, mock_error):

    with assert_setup_component(4):
        self.assertTrue(setup_component(self.hass, pilight.DOMAIN, {pilight.DOMAIN: {}}))
        self.hass.services.call(pilight.DOMAIN, pilight.SERVICE_NAME, service_data={'noprotocol': 'test', 'value': 42}, blocking=True)
        self.hass.block_till_done()
        error_log_call = mock_error.call_args_list[(-1)]
        self.assertTrue(("required    key    not    provided    @    data['protocol']" in str(error_log_call)))
