title: Mock a private function of a class which uses member variables in unittest python
body: <p>I have a simple class for example</p>
  
  <pre><code>class Child:
      def __init__(self,name,age):
          self.name=name
          self.age=age
  
      def __check(self):
          if self.age &gt;10:
              "insert into db both age and name"
          else:
              print(self.age)
  
      def call(self,flag):
          if flag:
              self.__check()
  </code></pre>
  
  <p>Now how do i test the <code>__check(private function)</code> using a mock in python</p>