code: def test_command_dispatch(self):
      # Test that .__init__ causes redirection of tk calls
      # through redir.dispatch
      self.root.call(self.text._w, "insert", "hello")
      self.assertEqual(self.func.args, ("hello",))
      self.assertEqual(self.text.get("1.0", "end"), "\n")
      # Ensure that called through redir .dispatch and not through
      # self.text.insert by having mock raise TclError.
      self.func.__init__(TclError())
      self.assertEqual(
          self.root.call(self.text._w, "insert", "boo"), ""
      )
  
imports: from idlelib.redirector import WidgetRedirector
  import unittest
  from test.support import requires
  from tkinter import Tk, Text, TclError
  from idlelib.idle_test.mock_idle import Func
label_desc: Use image node_id 13 for calling the WidgetRedirectorTest obj's underlying member method code with example usage: obj.test_command_dispatch() without return types