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.

2

Testing with python mock. Is it viable?

By
Carlos Llamacho
on 5/14/14, 12:20 AM 1,076 views

Hello...

I have been developing modules for a while and testing them using the standard unittest library and the openerp orm to create data to test. I have avoided the use of yml as normally i'm testing models methods and it's output with another models, but i find it to be a bad process to create the data and test it using the orm, for not mentioning that sometimes test take a loong time to complete.

My question is... have anyone considered using the mock library for mocking the openerp models and if so, how did you do it?

I have been reading a little about the mock library and i think i understand it, but so far can't see how can be used to mock objects inside openerp.

Thanks in advance.

1

Nehal

--Nehal--
2090
| 5 2 8
Ahmadabad, India
--Nehal--
Nehal
On 5/14/14, 1:47 AM

Hi,

You can refer the link if it may help you.

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: 5/14/14, 12:20 AM
Seen: 1076 times
Last updated: 4/10/15, 10:44 AM