Odoo Help

Welcome!

This community 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.

0

error yalm_import during simple unit test

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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