diff options
| author | P. Christeas <p_christ@hol.gr> | 2010-10-12 13:39:36 +0300 |
|---|---|---|
| committer | P. Christeas <p_christ@hol.gr> | 2010-10-12 13:39:36 +0300 |
| commit | 333c1c6ca8c9d473ff5de2f8b02f4238202ffcb6 (patch) | |
| tree | 41e088d24ad16d3d89c0f58fb17e95782e7505c7 /addons/document/test/document_test2.yml | |
| parent | b8c7bb81a9d77623d5a2b1bcf61d414b76c65631 (diff) | |
Doc: make sure folders are deleted after YAML tests
This will also enable the tests to run multiple times on the same db.
bzr revid: p_christ@hol.gr-20101012103936-d0e7o1b5ppu7kri5
Diffstat (limited to 'addons/document/test/document_test2.yml')
| -rw-r--r-- | addons/document/test/document_test2.yml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/addons/document/test/document_test2.yml b/addons/document/test/document_test2.yml index 34e834a5306..65312eaf10d 100644 --- a/addons/document/test/document_test2.yml +++ b/addons/document/test/document_test2.yml @@ -12,7 +12,7 @@ I create a "Testing" folder where all the test data will go. - !record {model: document.directory, id: dir_tests }: - name: 'Testing' + name: 'Testing (will be deleted!)' parent_id: dir_root - I create an attachment into the root folder (w. empty fields, test that @@ -52,7 +52,7 @@ I search the testing folder for attachments. - !python {model: ir.attachment}: | - ids = self.search(cr, uid, [('parent_id.name','=', 'Testing'), ('name','=','Test renamed 2')]) + ids = self.search(cr, uid, [('parent_id.name','=', 'Testing (will be deleted!)'), ('name','=','Test renamed 2')]) assert ids == [ ref("file_test2") ], ids - I create an attachment to a 3rd resource, eg. a res.country @@ -70,7 +70,14 @@ ids = self.search(cr, uid, [('res_model', '=', 'res.country'), ('res_id', '=', ref("base.za"))]) assert ids == [ ref("attach_3rd")], ids - - I delete the attachment + I delete the attachments - !python {model: ir.attachment}: | + self.unlink(cr, uid, [ref('file_test2')]) self.unlink(cr, uid, [ref('attach_3rd')]) +- + I delete the tests folder +- + !python {model: document.directory}: | + self.unlink(cr, uid, [ref('dir_tests')]) + cr.commit() |
