#NEWLINE# def test_duplicate_keys( self ) : #NEWLINE# #INDENT# with warnings . catch_warnings ( record = True ) as wlog : #NEWLINE# #INDENT# self . cb . _privflags |= LCB . PYCBC_CONN_F_WARNEXPLICIT #NEWLINE# warnings . resetwarnings ( ) #NEWLINE# meths = ( self . cb . get_multi , self . cb . remove_multi , self . cb . counter_multi ) #NEWLINE# for m in meths : #NEWLINE# #INDENT# print ( ktmp . __name__ ) #NEWLINE# try : #NEWLINE# #INDENT# m ( ( 'foo' , 'foo' ) ) #NEWLINE# #UNINDENT# except NotFoundError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . _assertWarned ( wlog ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . cb . lock_multi ( ( 'foo' , 'foo' ) , ttl = 5 ) #NEWLINE# #UNINDENT# except NotFoundError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . _assertWarned ( wlog ) #NEWLINE# ktmp = self . gen_key ( 'duplicate_keys' ) #NEWLINE# rv = self . cb . upsert ( ktmp , 'value' ) #NEWLINE# try : #NEWLINE# #INDENT# self . cb . unlock_multi ( ( rv , rv ) ) #NEWLINE# #UNINDENT# except ( NotFoundError , TemporaryFailError ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . _assertWarned ( wlog )