feat(fusion_accounting_reports): 2 cron jobs (anomaly scan + MV refresh)
Made-with: Cursor
This commit is contained in:
@@ -17,3 +17,4 @@ from . import test_engine_property
|
||||
from . import test_pnl_integration
|
||||
from . import test_bs_tb_integration
|
||||
from . import test_account_balance_mv
|
||||
from . import test_cron
|
||||
|
||||
20
fusion_accounting_reports/tests/test_cron.py
Normal file
20
fusion_accounting_reports/tests/test_cron.py
Normal file
@@ -0,0 +1,20 @@
|
||||
"""Tests for cron handlers."""
|
||||
|
||||
from odoo.tests.common import TransactionCase, tagged
|
||||
|
||||
|
||||
@tagged('post_install', '-at_install')
|
||||
class TestFusionReportsCron(TransactionCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.cron = self.env['fusion.reports.cron']
|
||||
|
||||
def test_cron_mv_refresh_does_not_raise(self):
|
||||
# Smoke test: the cron must complete without raising even if the
|
||||
# CONCURRENTLY path fails on a cold MV (the handler falls back).
|
||||
self.cron._cron_mv_refresh()
|
||||
|
||||
def test_cron_anomaly_scan_does_not_raise(self):
|
||||
# Smoke test: scan all companies, persist anomalies, no exceptions.
|
||||
self.cron._cron_anomaly_scan()
|
||||
Reference in New Issue
Block a user