'Send the configured payload as bytes.'

@patch('socket.socket')
@patch('select.select', return_value=(True, False, False))
def test_update_sends_payload(self, mock_select, mock_socket):

    tcp.TcpSensor(self.hass, TEST_CONFIG['sensor'])
    mock_socket = mock_socket().__enter__()
    mock_socket.send.assert_called_with(TEST_CONFIG['sensor'][tcp.CONF_PAYLOAD].encode())
