52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
-
|
|
In order to test the document management
|
|
-
|
|
I make sure the default installation has some storage and root directory.
|
|
-
|
|
!assert {model: document.storage, id: storage_default }:
|
|
- id != False
|
|
-
|
|
!assert {model: document.directory, id: dir_root}:
|
|
- storage_id != False
|
|
-
|
|
I create a "Testing" folder where all the test data will go.
|
|
-
|
|
!record {model: document.directory, id: dir_tests }:
|
|
name: 'Testing'
|
|
parent_id: dir_root
|
|
-
|
|
I create an attachment into the root folder (w. empty fields, test that
|
|
defaults work)
|
|
-
|
|
!record {model: ir.attachment, id: file_test1 }:
|
|
name: Test file
|
|
-
|
|
I delete the attachment from the root folder
|
|
-
|
|
!delete {model: ir.attachment, id: file_test1, search: }
|
|
-
|
|
I create an attachment into the Testing folder.
|
|
-
|
|
!record {model: ir.attachment, id: file_test2 }:
|
|
name: Test file 2
|
|
parent_id: dir_tests
|
|
-
|
|
I update the attachment with data, namely "abcd"
|
|
-
|
|
!record {model: ir.attachment, id: file_test2 }:
|
|
datas: abcd
|
|
-
|
|
I test that the datas of the attachment are correct
|
|
-
|
|
!assert {model: ir.attachment, id: file_test2 }:
|
|
- datas == 'abcd'
|
|
-
|
|
I rename the attachment.
|
|
-
|
|
I search the testing folder for attachments.
|
|
-
|
|
I create an attachment to a 3rd resource, eg. a res.country
|
|
-
|
|
I search for the res.country attachment
|
|
-
|