#NEWLINE# def test_error_replpropertymetadata( self ) : #NEWLINE# #INDENT# res = self . samdb . search ( expression = 'cn=Administrator' , scope = ldb . SCOPE_SUBTREE , attrs = [ 'replPropertyMetaData' ] ) #NEWLINE# repl = ndr_unpack ( drsblobs . replPropertyMetaDataBlob , str ( res [ 0 ] [ 'replPropertyMetaData' ] ) ) #NEWLINE# ctr = repl . ctr #NEWLINE# for o in ctr . array : #NEWLINE# #INDENT# if ( o . attid == 13 ) : #NEWLINE# #INDENT# old_version = o . version #NEWLINE# o . version = ( o . version + 1 ) #NEWLINE# #UNINDENT# #UNINDENT# replBlob = ndr_pack ( repl ) #NEWLINE# msg = ldb . Message ( ) #NEWLINE# msg . dn = res [ 0 ] . dn #NEWLINE# msg [ 'replPropertyMetaData' ] = ldb . MessageElement ( replBlob , ldb . FLAG_MOD_REPLACE , 'replPropertyMetaData' ) #NEWLINE# self . assertRaises ( ldb . LdbError , old_version . samdb . modify , msg , [ 'local_oid:1.3.6.1.4.1.7165.4.3.14:0' ] )