#NEWLINE# def test_lock( self , sr ) : #NEWLINE# #INDENT# lock = self . get_lock ( sr , 'foo' ) #NEWLINE# assert lock . acquire ( blocking = False ) #NEWLINE# assert ( sr . get ( 'foo' ) == lock . local . token ) #NEWLINE# assert ( sr . ttl ( 'foo' ) == ( - 1 ) ) #NEWLINE# lock . release ( ) #NEWLINE# assert ( sr . get ( 'foo' ) is None )