[FIX] document_ftp: use the login as a password in the tests.
authorVo Minh Thu <vmt@openerp.com>
Wed, 29 Dec 2010 16:13:22 +0000 (17:13 +0100)
committerVo Minh Thu <vmt@openerp.com>
Wed, 29 Dec 2010 16:13:22 +0000 (17:13 +0100)
This is done instead of querying the password and using it because when
base_crypt is installed, the password will be hashed.

bzr revid: vmt@openerp.com-20101229161322-at8c3zh3mnzchj94

addons/document_ftp/test_easyftp.py

index 1f7324b..04a480f 100644 (file)
@@ -37,7 +37,7 @@ def get_plain_ftp(timeout=10.0):
 def get_ftp_login(cr, uid, ormobj):
     ftp = get_plain_ftp()
     user = ormobj.pool.get('res.users').read(cr, uid, uid)
-    ftp.login(user.get('login',''), user.get('password',''))
+    ftp.login(user.get('login',''), user.get('login',''))
     ftp.cwd("/" + cr.dbname)
     return ftp
 
@@ -62,4 +62,4 @@ def get_ftp_fulldata(ftp, fname, limit=8192):
     ftp.retrbinary('RETR %s' % fname, partial(ffp,data))
     return ''.join(data)
 
-#eof
\ No newline at end of file
+#eof