From 950058dae348bfb856ce5cf9c120822d7a147f6f Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Tue, 6 Jul 2010 15:10:53 +0300 Subject: [PATCH] Document FTP: fix yaml tests. bzr revid: p_christ@hol.gr-20100706121053-5a9z29ub8hrnpqo9 --- addons/document_ftp/test/document_ftp_test2.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/document_ftp/test/document_ftp_test2.yml b/addons/document_ftp/test/document_ftp_test2.yml index a5eaa13521f..8b7d538c00b 100644 --- a/addons/document_ftp/test/document_ftp_test2.yml +++ b/addons/document_ftp/test/document_ftp_test2.yml @@ -21,7 +21,7 @@ !python {model: ir.attachment}: | from document_ftp import test_easyftp as te ftp = te.get_ftp_login(cr, uid, self) - ftp.cwd('/Documents') + ftp.cwd('Documents') - I create a "test.txt" file at the server (directly). The file should have the "abcd" content @@ -69,10 +69,13 @@ - !python {model: ir.attachment}: | from document_ftp import test_easyftp as te + import ftplib ftp = te.get_ftp_login(cr, uid, self) try: ftp.cwd('/Not-This') assert False, "We should't be able to change here" + except ftplib.error_perm: + pass except OSError, err: assert err.errno == 2, err.errno -