Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Issues when running tests

by
SMILE, Isabelle RICHARD
- 26/03/2024 21:07:13
Hi Francesco,

You are talking about master data, but the product with the reference product.product_product_9 is a demo data.
It's only present in your database if you enabled the Demo Data option, when you created your database.


Did you enable this?

Regards,

--
Isabelle RICHARD

Le mar. 26 mars 2024 à 20:57, Francesco Ballerini <notifications@odoo-community.org> a écrit :
Hello,

I am trying to run tests in my Odoo instance by adding --test enable but I'm having some issues. I am not used to run tests so I'm probably just missing something.

When I try to run tests for module sale_product_multi_add by launching command:

python3 odoo-bin -c odoo.conf -d dbname -u sale_product_multi_add --test-enable 

tests immediately fails because `self.env.ref()` cannot read external ids for master-datas. You can see the complete log in attached .txt

I have also tried to run the same command for module sale_product_brand_exception which also checks for master-data and I got the same error.

It seems like an issue with the environment, but addons path is defined in odoo.conf and working well outside of tests. I have also tried to pass --addons-path parameter in the CLI command but the result didn't changed.

I hope I have provided enough informations, if not, let me know.
Do you have any suggestions?

Thanks,
Fra B.


Privo di virus.www.avast.com

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference