pytest-odoo
pytest-odoo copied to clipboard
Thread testing flag missing
Odoo code base somewhere relies on threading.currentThread().testing = True
They set it here https://github.com/odoo/odoo/blob/11.0/odoo/modules/module.py#L503 and we tried already to simulate it here https://github.com/camptocamp/pytest-odoo/blob/master/pytest_odoo.py#L84
Still, seems to not work as expected. Use case: partner image default get https://github.com/odoo/odoo/blob/11.0/odoo/addons/base/res/res_partner.py#L282
In this case (our case) we had to create the partner inside the test and not inside test case setup to make it work exactly how it works w/ std odoo tests.