Contributors mailing list archives

Browse archives


Re: Issues when running tests

MT Software, Michael Tietz
- 26/03/2024 21:03:13

it seems that your database contains no demo data.
The tests are only running with demo data.

Ensure that you creating your database without this flat "--without-demo"

Am 26.03.24 um 20:57 schrieb Francesco Ballerini:

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?

Fra B.

Privo di

Post to: