Skip to Content

Contributors

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ón
Mobile: (+521) 477-752-22-30
Twitter: @moylop260
hangout: moylop260@vauxoo.com
http://www.vauxoo.com - Odoo Gold Partner
Twitter: @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

Reference

  • 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