parameters: (self)
return_statement: return expected
docstring: Verify the called method is expected.
  
      This can be an ordered method, or part of an unordered set.
  
      Returns:
        The expected mock method.
  
      Raises:
        UnexpectedMethodCall if the method called was not expected.
docstring_summary: Verify the called method is expected.
docstring_tokens: Verify the called method is expected .
function: def _VerifyMethodCall(self):
      """Verify the called method is expected.
  
      This can be an ordered method, or part of an unordered set.
  
      Returns:
        The expected mock method.
  
      Raises:
        UnexpectedMethodCall if the method called was not expected.
      """
  
      expected = self._PopNextMethod()
  
      # Loop here, because we might have a MethodGroup followed by another
      # group.
      while isinstance(expected, MethodGroup):
        expected, method = expected.MethodCalled(self)
        if method is not None:
          return method
  
      # This is a mock method, so just check equality.
      if expected != self:
        raise UnexpectedMethodCallError(self, expected)
  
      return expected
function_tokens: def _VerifyMethodCall ( self ) : expected = self . _PopNextMethod ( ) # Loop here, because we might have a MethodGroup followed by another # group. while isinstance ( expected , MethodGroup ) : expected , method = expected . MethodCalled ( self ) if method is not None : return method # This is a mock method, so just check equality. if expected != self : raise UnexpectedMethodCallError ( self , expected ) return expected