odoo/odoo#259832

Created by Framework (ORM), Krzysztof Magusiak (krma)

Blocked

label
odoo-dev:master-test-registry-mode-context-krma
head
5f1a67e156a5fa78da17634dcbaece24ab200baa
odoo/odoo odoo/enterprise odoo/upgrade-util
master #259832 missing statuses missing r+ #114161 missing statuses missing r+ #415 missing r+

[REF] tests: enter registry test mode context

Relocate registry test mode functions from BaseCase to TransactionCase
as they make sense only in context on a transaction managed by the test
case. The new implementation uses a context manager to avoid duplication
of code.

We need to leave the main context manager in BaseCase because it is used
directly by upgrade scripts.

odoo/enterprise#114161
odoo/upgrade-util#415


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr