diff options
| author | P. Christeas <p_christ@hol.gr> | 2010-10-27 13:23:23 +0300 |
|---|---|---|
| committer | P. Christeas <p_christ@hol.gr> | 2010-10-27 13:23:23 +0300 |
| commit | d1ee286bcb7f73daa856ef96ae31836d6e8fcd9d (patch) | |
| tree | a8a210a798cc85e00598eaae254664e7416f84c2 /addons/document_ftp/test | |
| parent | c3b4dba6713b7dc987f5e4a1bc4780392bd4903a (diff) | |
doc ftp: yaml tests for files/folders in wrong dirs.
bzr revid: p_christ@hol.gr-20101027102323-jtiwjjr52lht0dvr
Diffstat (limited to 'addons/document_ftp/test')
| -rw-r--r-- | addons/document_ftp/test/document_ftp_test4.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/addons/document_ftp/test/document_ftp_test4.yml b/addons/document_ftp/test/document_ftp_test4.yml index 2bb616dc1bd..2441be3bf92 100644 --- a/addons/document_ftp/test/document_ftp_test4.yml +++ b/addons/document_ftp/test/document_ftp_test4.yml @@ -114,6 +114,35 @@ - res_model == 'res.partner' - res_id != False - + I try to create a file directly under the Partners Testing folder +- + !python {model: ir.attachment}: | + from document_ftp import test_easyftp as te + import ftplib + from cStringIO import StringIO + ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Partners Testing') + fdata = StringIO('abcd') + try: + ftp.storbinary('STOR stray.txt', fdata) + assert False, "We should't be able to create files here" + except ftplib.error_perm: + # That's what should happen + pass +- + I try to create a folder directly under the Partners Testing folder +- + !python {model: ir.attachment}: | + from document_ftp import test_easyftp as te + import ftplib + from cStringIO import StringIO + ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Partners Testing') + try: + ftp.mkd('Weird folder') + assert False, "We should't be able to create folders here" + except ftplib.error_perm: + # That's what should happen + pass +- I check that all/Partner1 also has the file - | Bonus Piste: |
