Fixes/hides a deadlock when running test_sale_order with either a single database or a db_filter making a single database visible: the test causes a report to be printed, which invokes wkhtmltopdf, which tries to fetch assets using the registry which is being loaded. The asset request thus waits on a lock which is held by the test which waits on the asset, deadlocking the whole thing. Using HttpCase means we're using the test_cr or something and bypassing the deadlock, instead the asset requests just 404 as they do when using the nodb routing.
19 lines
750 B
Python
19 lines
750 B
Python
# -*- coding: utf-8 -*-
|
|
from openerp.tests.common import HttpCase
|
|
|
|
class AccountingTestCase(HttpCase):
|
|
""" This class extends the base TransactionCase, in order to test the
|
|
accounting with localization setups. It is configured to run the tests after
|
|
the installation of all modules, and will SKIP TESTS ifit cannot find an already
|
|
configured accounting (which means no localization module has been installed).
|
|
"""
|
|
|
|
post_install = True
|
|
at_install = False
|
|
|
|
def setUp(self):
|
|
super(AccountingTestCase, self).setUp()
|
|
domain = [('company_id', '=', self.env.ref('base.main_company').id)]
|
|
if not self.env['account.account'].search_count(domain):
|
|
self.skipTest("No Chart of account found")
|