parameters: (self, class_to_mock)
docstring: Initialize a mock object.
  
      This determines the methods and properties of the class and stores them.
  
      Args:
        # class_to_mock: class to be mocked
        class_to_mock: class
docstring_summary: Initialize a mock object.
docstring_tokens: Initialize a mock object .
function: def __init__(self, class_to_mock):
      """Initialize a mock object.
  
      This determines the methods and properties of the class and stores them.
  
      Args:
        # class_to_mock: class to be mocked
        class_to_mock: class
      """
  
      # This is used to hack around the mixin/inheritance of MockAnything, which
      # is not a proper object (it can be anything. :-)
      MockAnything.__dict__['__init__'](self)
  
      # Get a list of all the public and special methods we should mock.
      self._known_methods = set()
      self._known_vars = set()
      self._class_to_mock = class_to_mock
      for method in dir(class_to_mock):
        if callable(getattr(class_to_mock, method)):
          self._known_methods.add(method)
        else:
          self._known_vars.add(method)
function_tokens: def __init__ ( self , class_to_mock ) : # This is used to hack around the mixin/inheritance of MockAnything, which # is not a proper object (it can be anything. :-) MockAnything . __dict__ [ '__init__' ] ( self ) # Get a list of all the public and special methods we should mock. self . _known_methods = set ( ) self . _known_vars = set ( ) self . _class_to_mock = class_to_mock for method in dir ( class_to_mock ) : if callable ( getattr ( class_to_mock , method ) ) : self . _known_methods . add ( method ) else : self . _known_vars . add ( method )