Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
7339 Lượt xem

Hello,

I been working with test yaml for openerp module since last six months and everything was going okey. But today I found something that I am not sure what it that happening.

I have a module that only load data into openerp records, and it has not demo. I add a test folder into the module folder, also add a yml file into the test folder. I update the __openerp__.py file and add the key to the descriptor.

"test": [ 'test/file.yml', ],

Then I run the server using -d my_db -u my_module --log-level=test --test-enable options. This should make the test run but It don't. The server log tells me that It loaded the data but did not run the test yaml. It is like the test yaml file does not exist.

I try to force it adding the --test-file=file.yml option to the server options and it works but I don't understand why without this options do not automatically run the test.

Please Help, Best Regards

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

The reason is because the database where you run the test need to have data demo, if the database was created without data demo then the tests will not run. If the database was created with data demo then the test will run

 

Ảnh đại diện
Huỷ bỏ