#NEWLINE# def test_change_password_with_too_long_password( self ) : #NEWLINE# #INDENT# user = 'testchangepassworduser' #NEWLINE# config = { #NEWLINE# #INDENT# 'hosts' : TestChangePassword . hostlist , #NEWLINE# #UNINDENT# } #NEWLINE# self . clientreaduser = aerospike . client ( config ) . connect ( user , 'aerospike' ) #NEWLINE# policy = { #NEWLINE# #INDENT# 'timeout' : 100 , #NEWLINE# #UNINDENT# } #NEWLINE# password = ( 'password' * 1000 ) #NEWLINE# status = self . clientreaduser . admin_change_password ( user , password , policy ) #NEWLINE# assert ( status == 0 ) #NEWLINE# config = { #NEWLINE# #INDENT# 'hosts' : TestChangePassword . hostlist , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# self . clientreaduserwrong = aerospike . client ( config ) . connect ( user , 'aerospike' ) #NEWLINE# #UNINDENT# except aerospike . exception . InvalidPassword as exception : #NEWLINE# #INDENT# assert ( exception . code == 62 ) #NEWLINE# assert ( exception . msg is None ) #NEWLINE# #UNINDENT# except aerospike . exception . ClientError as exception : #NEWLINE# #INDENT# assert ( exception . code == ( - 1 ) ) #NEWLINE# assert ( exception . msg == 'Failed to seed cluster' ) #NEWLINE# #UNINDENT# self . clientreaduserright = aerospike . client ( config ) . connect ( user , password ) #NEWLINE# assert ( self . clientreaduserright is not None ) #NEWLINE# self . clientreaduserright . close ( ) #NEWLINE# self . clientreaduser . close ( )