#NEWLINE# def _MockMemcache( self , method_name , * args , **kwargs ) : #NEWLINE# #INDENT# "Mock a method call to memcache.\n\n    Args:\n      method_name: str, like 'get'\n      *args: list, arguments to supply\n      **kwargs: dict, arguments to supply\n    Returns:\n      mocked function handler ready to apply action to (e.g. .AndReturn())\n    " #NEWLINE# if ( not ( 'memcache' in self . _mocked ) ) : #NEWLINE# #INDENT# self . stubs . Set ( gaeserver , 'memcache' , self . mox . CreateMock ( gaeserver . memcache ) ) #NEWLINE# self . _mocked [ 'memcache' ] = True #NEWLINE# #UNINDENT# return getattr ( gaeserver . memcache , method_name ) ( * args , ** kwargs )