Odoo Help


error yalm_import during simple unit test

on 10/10/13, 8:38 AM 1,018 views

Hi all,

I try to test unit test in openerp v7. I have create a simple object named zentest. In this object i have 2 fields : myinteger and mytext.

I create a yml file to run unit tests :

  !record {model: zentest, id: myzentestyml0, view: False}:
   mytext: on test le truc
   myinteger: 6
  !assert {model: zentest, id: myzentestyml0, string: My first test}:
   - myinteger == 6
  !python {model: zentest}: |
    mydata = self.browse(cr, uid, ref("myzentestyml0"))
    assert mydata.myinteger == 6, "the second test"

I run this test with the command : python /opt/openerp/server/openerp-server --init=zentest --test-file=/opt/openerp/addons/zentest/test/zen_test.yml -d test --test-enable

I have this message : ERROR test openerp.tools.yaml_import: myzentestyml0 not found when processing /opt/openerp/addons/zentest/test/zen_test.yml.

I don't understand : the first test is ok then myzentestyml0 look's ok. Any idea ?



About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/10/13, 8:38 AM
Seen: 1018 times
Last updated: 3/16/15, 8:10 AM