summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/document_ftp/test/document_ftp_test4.yml29
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: