Odoo Help

0

error yalm_import during simple unit test

By
arnaud
on 10/10/13, 8:38 AM 825 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 ?

thanks

Arnaud

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.

Register

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)

Stats

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