summaryrefslogtreecommitdiff
path: root/addons/document_ftp/test/document_ftp_test2.yml
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2011-10-13 19:03:27 +0200
committerOlivier Dony <odo@openerp.com>2011-10-13 19:03:27 +0200
commit3bffe65b2ca8bc50ece644e7947ad2bbd5c9341a (patch)
treeb307874680dbdce7b2f5109b7b696ea38e679e20 /addons/document_ftp/test/document_ftp_test2.yml
parenta93ca01b5b1365f92e191e3c429ef655e751b455 (diff)
parent8a7c61cb96a541a9aaca51ffe3ee903407b26360 (diff)
[MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20111013170327-9rvfdkbgj01hdgxb
Diffstat (limited to 'addons/document_ftp/test/document_ftp_test2.yml')
-rw-r--r--addons/document_ftp/test/document_ftp_test2.yml7
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/document_ftp/test/document_ftp_test2.yml b/addons/document_ftp/test/document_ftp_test2.yml
index 872456e7191..33ce1416ec8 100644
--- a/addons/document_ftp/test/document_ftp_test2.yml
+++ b/addons/document_ftp/test/document_ftp_test2.yml
@@ -100,12 +100,13 @@
fdata = StringIO('abcd')
ftp.storbinary('STOR test2.txt', fdata)
ftp.close()
+ cr.commit()
-
I look for the "test2.txt" file at the server
-
!python {model: ir.attachment }: |
ids = self.search(cr, uid, [('name', '=', 'test2.txt')])
- assert ids
+ assert ids, "No test2.txt file found."
-
I delete the "test2.txt" file using FTP.
-
@@ -115,12 +116,13 @@
ftp = te.get_ftp_folder(cr, uid, self, 'Documents')
ftp.delete('test2.txt')
ftp.close()
+ cr.commit()
-
I check at the server that test2.txt is deleted
-
!python {model: ir.attachment }: |
ids = self.search(cr, uid, [('name', '=', 'test2.txt')])
- assert not ids
+ assert not ids, "test2.txt file can still be found."
-
I create a test2.txt file again.
-
@@ -131,6 +133,7 @@
fdata = StringIO('abcd')
ftp.storbinary('STOR test2.txt', fdata)
ftp.close()
+ cr.commit()
-
I delete the test2.txt from the server (RPC).
-