#NEWLINE# def testAddSeparate( self ) : #NEWLINE# #INDENT# 'Modify & commit should write the right data to the server.' #NEWLINE# client = LDAPClientTestDriver ( [ pureldap . LDAPModifyResponse ( resultCode = 0 , matchedDN = '' , errorMessage = '' ) ] ) #NEWLINE# o = ldapsyntax . LDAPEntry ( client = client , dn = 'cn=foo,dc=example,dc=com' , attributes = { #NEWLINE# #INDENT# 'objectClass' : [ 'a' , 'b' ] , #NEWLINE# 'aValue' : [ 'a' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# o [ 'aValue' ] . add ( 'newValue' ) #NEWLINE# o [ 'aValue' ] . add ( 'anotherNewValue' ) #NEWLINE# d = o . commit ( ) #NEWLINE# def cb( dummy ) : #NEWLINE# #INDENT# client . assertSent ( delta . ModifyOp ( 'cn=foo,dc=example,dc=com' , [ delta . Add ( 'aValue' , [ 'newValue' ] ) , delta . Add ( 'aValue' , [ 'anotherNewValue' ] ) ] ) . asLDAP ( ) ) #NEWLINE# #UNINDENT# d . addCallback ( cb ) #NEWLINE# return d