- Mailing Lists
- Contributors
- Weird issue: database does not run 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
Weird issue: database does not run tests
Hello, I found this issue, and it is puzzling me, so I wonder if someone out there has some idea. While creating a new module, using a dev database with demo data, at some point I added tests. However, these tests don't get to run. I'm sure their Python files are being loaded, but the test runner is not executing them. It is not like they are failing because of wrong data, They're simply not being executed, After several trial and errors, I got them running after creating a new database and running them on this database. So everything is the same: the code, the conf file, the system environment, ... But test run in database B and not in database A! Why would that be? This was using Odoo 12. Thanks for any insights Daniel Reis Open Source Integrators
by Daniel Reis - 12:01 - 24 Sep 2020
Follow-Ups
-
Re: Weird issue: database does not run tests
Thank you all for your ideas.
I believe Moises has hit the nail in the head.
Looking at the database, I found that my custom module didn't have the demonstration data flag set:
12-work=# select demo, count(*) from ir_module_module where state='installed' group by demo;
demo | count
------+-------
f | 2
t | 36
(2 rows)
I tried the following:
12-work=# update ir_module_module set demo=True where state='installed' and demo=False;
UPDATE 2
After doing this, tests are now executed as expected. \o/
I still think this there is an Odoo framework bug somewhere, but it least the case is identified and a workaround to save the database was found.
Thanks again
Daniel
On 24/09/2020 14:37, Moises Lopez wrote:
Hi Daniel
I noticed recently that if a module has errors loading data demo Odoo will disable it only for that module without errors but warnings.
Could you check if the boolean "ir_module_module.demo" is True or not for that module?
--
Moisés López CalderónMobile: (+521) 477-752-22-30Twitter: @moylop260Twitter: @vauxoo_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Daniel Reis - 01:45 - 25 Sep 2020 -
Re: Weird issue: database does not run tests
Hi DanielI noticed recently that if a module has errors loading data demo Odoo will disable it only for that module without errors but warnings.Could you check if the boolean "ir_module_module.demo" is True or not for that module?--Moisés López CalderónMobile: (+521) 477-752-22-30Twitter: @moylop260Twitter: @vauxoo
by Moisés López Calderón - 03:36 - 24 Sep 2020 -
Re: Weird issue: database does not run tests
One of our developers just had this issue with a single module. The tests would run in a copy of the production database, but not in a fresh and empty database.I asked him to install the module manually from the UI in the empty database and turns out that a dependency was missing in the manifest file and the module failed to install. This dependency was present in the copy of the production database and that's why the tests worked just fine there.--
Miku Laitinen, CTO, Partner
WEB-VEISTÄMÖ OY / AVOIN.SYSTEMSTutustu meikäläiseen ja muihin veistämöläisiin paremmin!
On Thu, Sep 24, 2020 at 1:57 PM Graeme Gellatly <gdgellatly@gmail.com> wrote:If a module is already installed -u works just fine. Im not sure -i even works if already installed hence the suggestion.On Thu, 24 Sep 2020, 10:42 pm Richard deMeester, <richard.demeester@willdooit.com> wrote:Oh, and tests only run when installing the module - have you used "-i module --test-entable" from the command line?
Richard deMeester
Senior Development Analyst
WilldooIT Pty Ltd
E: richard.demeester@willdooit.com
M: +61 403 76 76 76
P: +61 3 9135 1900
A: 10/435 Williamstown Road, Port Melbourne, Vic 3207
Making growth through technology easy
DISCLAIMER | This electronic message together with any attachments is confidential. If you are not the recipient, do not copy, disclose, or use the contents in any way. Please also advise us by e-mail that you have received this message in error and then please destroy this email and any of its attachments. WilldooIT Pty. Ltd. is not responsible for any changes made to this message and/or any attachments after sending by WilldooIT Pty. Ltd. WilldooIT Pty. Ltd. use virus scanning software but exclude all liability for virus or anything similar in this email or attachment.
From: Daniel Reis <dreis@opensourceintegrators.com>
Sent: Thursday, 24 September 2020 8:01 PM
To: Contributors <contributors@odoo-community.org>
Subject: Weird issue: database does not run testsHello, I found this issue, and it is puzzling me, so I wonder if someone out there has some idea. While creating a new module, using a dev database with demo data, at some point I added tests. However, these tests don't get to run. I'm sure their Python files are being loaded, but the test runner is not executing them. It is not like they are failing because of wrong data, They're simply not being executed, After several trial and errors, I got them running after creating a new database and running them on this database. So everything is the same: the code, the conf file, the system environment, ... But test run in database B and not in database A! Why would that be? This was using Odoo 12. Thanks for any insights Daniel Reis Open Source Integrators
_______________________________________________
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
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Miku Laitinen. - 02:01 - 24 Sep 2020 -
Re: Weird issue: database does not run tests
If a module is already installed -u works just fine. Im not sure -i even works if already installed hence the suggestion.On Thu, 24 Sep 2020, 10:42 pm Richard deMeester, <richard.demeester@willdooit.com> wrote:Oh, and tests only run when installing the module - have you used "-i module --test-entable" from the command line?
Richard deMeester
Senior Development Analyst
WilldooIT Pty Ltd
E: richard.demeester@willdooit.com
M: +61 403 76 76 76
P: +61 3 9135 1900
A: 10/435 Williamstown Road, Port Melbourne, Vic 3207
Making growth through technology easy
DISCLAIMER | This electronic message together with any attachments is confidential. If you are not the recipient, do not copy, disclose, or use the contents in any way. Please also advise us by e-mail that you have received this message in error and then please destroy this email and any of its attachments. WilldooIT Pty. Ltd. is not responsible for any changes made to this message and/or any attachments after sending by WilldooIT Pty. Ltd. WilldooIT Pty. Ltd. use virus scanning software but exclude all liability for virus or anything similar in this email or attachment.
From: Daniel Reis <dreis@opensourceintegrators.com>
Sent: Thursday, 24 September 2020 8:01 PM
To: Contributors <contributors@odoo-community.org>
Subject: Weird issue: database does not run testsHello, I found this issue, and it is puzzling me, so I wonder if someone out there has some idea. While creating a new module, using a dev database with demo data, at some point I added tests. However, these tests don't get to run. I'm sure their Python files are being loaded, but the test runner is not executing them. It is not like they are failing because of wrong data, They're simply not being executed, After several trial and errors, I got them running after creating a new database and running them on this database. So everything is the same: the code, the conf file, the system environment, ... But test run in database B and not in database A! Why would that be? This was using Odoo 12. Thanks for any insights Daniel Reis Open Source Integrators
_______________________________________________
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 Graeme Gellatly - 12:55 - 24 Sep 2020 -
Re: Weird issue: database does not run tests
Oh, and tests only run when installing the module - have you used "-i module --test-entable" from the command line?
Richard deMeester
Senior Development Analyst
WilldooIT Pty Ltd
E: richard.demeester@willdooit.com
M: +61 403 76 76 76
P: +61 3 9135 1900
A: 10/435 Williamstown Road, Port Melbourne, Vic 3207
Making growth through technology easy
DISCLAIMER | This electronic message together with any attachments is confidential. If you are not the recipient, do not copy, disclose, or use the contents in any way. Please also advise us by e-mail that you have received this message in error and then please destroy this email and any of its attachments. WilldooIT Pty. Ltd. is not responsible for any changes made to this message and/or any attachments after sending by WilldooIT Pty. Ltd. WilldooIT Pty. Ltd. use virus scanning software but exclude all liability for virus or anything similar in this email or attachment.
From: Daniel Reis <dreis@opensourceintegrators.com>
Sent: Thursday, 24 September 2020 8:01 PM
To: Contributors <contributors@odoo-community.org>
Subject: Weird issue: database does not run testsHello, I found this issue, and it is puzzling me, so I wonder if someone out there has some idea. While creating a new module, using a dev database with demo data, at some point I added tests. However, these tests don't get to run. I'm sure their Python files are being loaded, but the test runner is not executing them. It is not like they are failing because of wrong data, They're simply not being executed, After several trial and errors, I got them running after creating a new database and running them on this database. So everything is the same: the code, the conf file, the system environment, ... But test run in database B and not in database A! Why would that be? This was using Odoo 12. Thanks for any insights Daniel Reis Open Source Integrators
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Richard deMeester <richard.demeester@willdooit.com> - 12:41 - 24 Sep 2020