#NEWLINE# def testPasswordSetting_Samba_sambaSamAccount( self ) : #NEWLINE# #INDENT# "LDAPEntry.setPassword_Samba(newPasswd=..., style='sambaSamAccount') changes the password." #NEWLINE# client = LDAPClientTestDriver ( [ pureldap . LDAPModifyResponse ( resultCode = 0 , matchedDN = '' , errorMessage = '' ) ] ) #NEWLINE# o = ldapsyntax . LDAPEntry ( client = client , dn = 'cn=foo,dc=example,dc=com' ) #NEWLINE# d = o . setPassword_Samba ( newPasswd = 'new' , style = 'sambaSamAccount' ) #NEWLINE# def cb( dummy ) : #NEWLINE# #INDENT# client . assertSent ( delta . ModifyOp ( 'cn=foo,dc=example,dc=com' , [ delta . Replace ( 'sambaNTPassword' , [ '89963F5042E5041A59C249282387A622' ] ) , delta . Replace ( 'sambaLMPassword' , [ 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ] ) ] ) . asLDAP ( ) ) #NEWLINE# #UNINDENT# d . addCallback ( cb ) #NEWLINE# return d