- Mailing Lists
- Contributors
- Re: Issues when running tests
Archives
- By thread 1419
-
By date
- August 2019 59
- September 2019 118
- October 2019 165
- November 2019 97
- December 2019 35
- January 2020 58
- February 2020 204
- March 2020 121
- April 2020 172
- May 2020 50
- June 2020 158
- July 2020 85
- August 2020 94
- September 2020 193
- October 2020 277
- November 2020 100
- December 2020 159
- January 2021 38
- February 2021 87
- March 2021 146
- April 2021 73
- May 2021 90
- June 2021 86
- July 2021 123
- August 2021 50
- September 2021 68
- October 2021 66
- November 2021 74
- December 2021 75
- January 2022 98
- February 2022 77
- March 2022 68
- April 2022 31
- May 2022 59
- June 2022 87
- July 2022 141
- August 2022 38
- September 2022 73
- October 2022 152
- November 2022 39
- December 2022 50
- January 2023 93
- February 2023 49
- March 2023 106
- April 2023 47
- May 2023 69
- June 2023 92
- July 2023 64
- August 2023 103
- September 2023 91
- October 2023 101
- November 2023 94
- December 2023 46
- January 2024 75
- February 2024 79
- March 2024 104
- April 2024 63
- May 2024 40
- June 2024 160
- July 2024 80
- August 2024 70
- September 2024 62
- October 2024 121
- November 2024 117
- December 2024 89
- January 2025 59
- February 2025 104
- March 2025 96
- April 2025 107
- May 2025 52
- June 2025 72
- July 2025 60
- August 2025 81
- September 2025 124
- October 2025 63
- November 2025 22
Contributors
Re: Issues when running tests
Regards,
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-enabletests immediately fails because `self.env.ref()` cannot read external ids for master-datas. You can see the complete log in attached .txtI 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._______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Isabelle RICHARD - 09:10 - 26 Mar 2024
Reference
-
Issues when running tests
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-enabletests immediately fails because `self.env.ref()` cannot read external ids for master-datas. You can see the complete log in attached .txtI 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.
by Francesco Ballerini - 08:57 - 26 Mar 2024-
Re: Issues when running tests
I take the freedom to ask an additional tip, this time is about writing tests:I made this PR which is only failing code coverage check by a 0,01% diff compared to last commit.This diff though, is marked as an indirect change due to partial coverage of a line which is defined in another module: see on code coverage .Is it possible for me to fix this missing coverage in my PR? Any hint on how to manage this?Thank you again,Fra B.Il giorno mar 26 mar 2024 alle ore 22:26 Francesco Ballerini <francescobl.lavoro@gmail.com> ha scritto:Thanks @Michael Tietz @Isabelle RICHARD, my brain often goes into "low battery mode" at the end of the day. I was running tests in a db without demo datas enabled and confusing master-data and demo data. 😁Thank you very muchFrancesco B.Il giorno mar 26 mar 2024 alle ore 21:12 Isabelle RICHARD <notifications@odoo-community.org> ha scritto: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.Data is defined in: https://github.com/odoo/odoo/blob/14.0/addons/product/data/product_demo.xmlWhich is referred as a demo file in manifest: https://github.com/odoo/odoo/blob/14.0/addons/product/__manifest__.py#L48Did you enable this?
Regards,--Isabelle RICHARDLe 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-enabletests immediately fails because `self.env.ref()` cannot read external ids for master-datas. You can see the complete log in attached .txtI 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._______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Francesco Ballerini - 10:56 - 27 Mar 2024 -
Re: Issues when running tests
Thanks @Michael Tietz @Isabelle RICHARD, my brain often goes into "low battery mode" at the end of the day. I was running tests in a db without demo datas enabled and confusing master-data and demo data. 😁Thank you very muchFrancesco B.Il giorno mar 26 mar 2024 alle ore 21:12 Isabelle RICHARD <notifications@odoo-community.org> ha scritto: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.Data is defined in: https://github.com/odoo/odoo/blob/14.0/addons/product/data/product_demo.xmlWhich is referred as a demo file in manifest: https://github.com/odoo/odoo/blob/14.0/addons/product/__manifest__.py#L48Did you enable this?
Regards,--Isabelle RICHARDLe 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-enabletests immediately fails because `self.env.ref()` cannot read external ids for master-datas. You can see the complete log in attached .txtI 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._______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Francesco Ballerini - 10:31 - 26 Mar 2024 -
Re: Issues when running tests
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.Data is defined in: https://github.com/odoo/odoo/blob/14.0/addons/product/data/product_demo.xmlWhich is referred as a demo file in manifest: https://github.com/odoo/odoo/blob/14.0/addons/product/__manifest__.py#L48Did you enable this?
Regards,--Isabelle RICHARDLe 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-enabletests immediately fails because `self.env.ref()` cannot read external ids for master-datas. You can see the complete log in attached .txtI 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._______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Isabelle RICHARD - 09:10 - 26 Mar 2024 -
Re: Issues when running tests
Hello,
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" https://www.odoo.com/documentation/17.0/developer/reference/cli.html?highlight=demo#cmdoption-odoo-bin-without-demo
Am 26.03.24 um 20:57 schrieb Francesco Ballerini:
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
by Michael Tietz - 09:06 - 26 Mar 2024
-