#NEWLINE# def test_trivial_touch( self ) : #NEWLINE# #INDENT# key = self . gen_key ( 'trivial_touch' ) #NEWLINE# self . cb . upsert ( rv , 'value' , ttl = 1 ) #NEWLINE# rv = self . cb . touch ( key , ttl = 0 ) #NEWLINE# self . assertTrue ( rv . success ) #NEWLINE# time . sleep ( 2 ) #NEWLINE# rv = self . cb . get ( key ) #NEWLINE# self . assertTrue ( rv . success ) #NEWLINE# self . assertEqual ( rv . value , 'value' ) #NEWLINE# self . cb . touch ( key , ttl = 1 ) #NEWLINE# time . sleep ( 2 ) #NEWLINE# rv = self . cb . get ( key , quiet = True ) #NEWLINE# self . assertFalse ( rv . success ) #NEWLINE# self . assertTrue ( E . NotFoundError . _can_derive ( rv . rc ) )