#NEWLINE# def testObtainLockWhenFail( self ) : #NEWLINE# #INDENT# 'Test ObtainLock().' #NEWLINE# lock = 'foo' #NEWLINE# self . mox . StubOutWithMock ( gae_util , 'memcache' ) #NEWLINE# gae_util . memcache . incr ( ( 'lock_%s' % lock ) , initial_value = 0 ) . AndReturn ( 2 ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# self . assertFalse ( gae_util . ObtainLock ( self ) ) #NEWLINE# self . mox . VerifyAll ( )