summaryrefslogtreecommitdiff
path: root/addons/document_ftp/test/document_ftp_test3.yml
diff options
context:
space:
mode:
authorHarry (OpenERP) <hmo@tinyerp.com>2010-07-20 18:35:13 +0530
committerHarry (OpenERP) <hmo@tinyerp.com>2010-07-20 18:35:13 +0530
commit77f62a88a314a905e5ffc73cffd72d68ddfe33db (patch)
treeedc70351000fba9ea5a4ab27a3f680c5844e9e82 /addons/document_ftp/test/document_ftp_test3.yml
parent90234707dc901a81935570274c52a5327940b66e (diff)
parent1eea693ecadd3829fa729a727a154c23a1df6ab6 (diff)
[MERGE] merged new api of document module
bzr revid: hmo@tinyerp.com-20100720130513-3t2cbyvns3hlj6qn
Diffstat (limited to 'addons/document_ftp/test/document_ftp_test3.yml')
-rw-r--r--addons/document_ftp/test/document_ftp_test3.yml82
1 files changed, 82 insertions, 0 deletions
diff --git a/addons/document_ftp/test/document_ftp_test3.yml b/addons/document_ftp/test/document_ftp_test3.yml
new file mode 100644
index 00000000000..2161c1421da
--- /dev/null
+++ b/addons/document_ftp/test/document_ftp_test3.yml
@@ -0,0 +1,82 @@
+-
+ In order to check international character functionality
+-
+ !python {model: ir.attachment}: |
+ from document_ftp import test_easyftp as te
+ ftp = te.get_plain_ftp(timeout=1.0)
+-
+ I create in the server a folder called 'Δοκιμαστικός Φάκελλος'
+-
+ !record {model: document.directory, id: dir_itests }:
+ name: 'Δοκιμαστικός Φάκελλος'
+ parent_id: document.dir_root
+-
+ And then I create another folder, under it, through FTP
+-
+ !python {model: ir.attachment}: |
+ cr.commit()
+ from document_ftp import test_easyftp as te
+ ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Δοκιμαστικός Φάκελλος')
+ ftp.mkd("Φάκελλος από κάτω")
+-
+ I check that this folder exists at the server
+-
+ !assert {model: document.directory, id: , search: "[('name','=','Φάκελλος από κάτω')]" }:
+ - parent_id != False
+-
+ I login with FTP and check that 'Δοκιμαστικός Φάκελλος' is there
+-
+ !python {model: ir.attachment}: |
+ from document_ftp import test_easyftp as te
+ ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Δοκιμαστικός Φάκελλος/Φάκελλος από κάτω')
+-
+ I create a file named 'Δοκιμή' into that folder
+-
+ !python {model: ir.attachment}: |
+ from document_ftp import test_easyftp as te
+ from cStringIO import StringIO
+ ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Δοκιμαστικός Φάκελλος/Φάκελλος από κάτω')
+ fdata = StringIO('κείμενο με utf-8')
+ ftp.storbinary('STOR Δοκιμή.txt', fdata)
+-
+ I remove the 'Δοκιμή.txt' file
+-
+ !python {model: ir.attachment}: |
+ from document_ftp import test_easyftp as te
+ from cStringIO import StringIO
+ ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Δοκιμαστικός Φάκελλος/Φάκελλος από κάτω')
+ ftp.delete('Δοκιμή.txt')
+-
+ I rename 'Φάκελλος από κάτω' into 'άλλος'
+-
+ !python {model: ir.attachment}: |
+ from document_ftp import test_easyftp as te
+ ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Δοκιμαστικός Φάκελλος')
+ ftp.rename("Φάκελλος από κάτω", "άλλος")
+-
+ I place a file 'file Φ3' in 'άλλος'
+-
+ !python {model: ir.attachment}: |
+ from document_ftp import test_easyftp as te
+ from cStringIO import StringIO
+ ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Δοκιμαστικός Φάκελλος/άλλος')
+ fdata = StringIO('κι άλλο κείμενο')
+ ftp.storbinary('STOR file Φ3.txt', fdata)
+-
+ I rename the file into file+range(1..200) (large filename)
+-
+ !python {model: ir.attachment}: |
+ from document_ftp import test_easyftp as te
+ from cStringIO import StringIO
+ ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Δοκιμαστικός Φάκελλος/άλλος')
+ vuvuzela = 'b'+''.join('z' * 200)+'!'
+ ftp.rename("file Φ3.txt", vuvuzela)
+-
+ I delete the file with the large name
+-
+ !python {model: ir.attachment}: |
+ from document_ftp import test_easyftp as te
+ from cStringIO import StringIO
+ ftp = te.get_ftp_folder(cr, uid, self, 'Documents/Δοκιμαστικός Φάκελλος/άλλος')
+ vuvuzela = 'b'+''.join('z' * 200)+'!'
+ ftp.delete(vuvuzela)