Files
Odoo-Modules/fusion_accounting_reports/tests/test_account_balance_mv.py
2026-04-19 15:53:34 -04:00

21 lines
781 B
Python

"""Tests for fusion_account_balance MV."""
from odoo.tests.common import TransactionCase, tagged
@tagged('post_install', '-at_install')
class TestAccountBalanceMV(TransactionCase):
def test_mv_exists_and_is_queryable(self):
# Force initial refresh, then make sure the model can read it.
self.env['fusion.account.balance.mv']._refresh(concurrently=False)
rows = self.env['fusion.account.balance.mv'].search([], limit=5)
self.assertIsNotNone(rows)
def test_mv_refresh_concurrent(self):
# Try concurrent refresh; should either succeed or fall back gracefully.
try:
self.env['fusion.account.balance.mv']._refresh(concurrently=True)
except Exception as e:
self.fail(f"MV refresh raised: {e}")