#NEWLINE# def test_list_trim_with_correct_policy( self ) : #NEWLINE# #INDENT# '\n        Invoke list_trim() removes elements from list with correct policy\n        ' #NEWLINE# key = ( 'test' , 'demo' , 2 ) #NEWLINE# policy = { #NEWLINE# #INDENT# 'timeout' : 1000 , #NEWLINE# 'retry' : aerospike . POLICY_RETRY_ONCE , #NEWLINE# 'commit_level' : aerospike . POLICY_COMMIT_LEVEL_MASTER , #NEWLINE# #UNINDENT# } #NEWLINE# status = TestListTrim . client . list_trim ( key , 'contact_no' , 0 , 3 , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , policy ) #NEWLINE# assert ( status == 0 ) #NEWLINE# ( key , _ , bins ) = TestListTrim . client . get ( key ) #NEWLINE# assert ( bins == { #NEWLINE# #INDENT# 'city' : [ 'Pune' , 'Dehli' , 'Mumbai' ] , #NEWLINE# 'contact_no' : [ 2 , 3 , 4 ] , #NEWLINE# 'name' : 'name2' , #NEWLINE# #UNINDENT# } )