From 190c29624002488b643d34e0cac23e03fa1d7a9b Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 19 Apr 2026 21:50:47 -0400 Subject: [PATCH] fix(fusion_accounting_ai): align legacy assets-adapter test with Phase 3 return shape MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 3 (fusion_accounting_assets) changed list_assets() to return {count, total, assets} dict instead of a flat list — consistent with bank_rec.list_unreconciled, reports.run_report, followup.list_overdue. The pre-existing test in fusion_accounting_ai still asserted isinstance(rows, list) and was failing on every run since Phase 3 merge. Updated to assert dict shape. Made-with: Cursor --- fusion_accounting_ai/tests/test_data_adapters.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fusion_accounting_ai/tests/test_data_adapters.py b/fusion_accounting_ai/tests/test_data_adapters.py index f07d346c..0241cbcd 100644 --- a/fusion_accounting_ai/tests/test_data_adapters.py +++ b/fusion_accounting_ai/tests/test_data_adapters.py @@ -140,7 +140,11 @@ class TestFollowupAdapter(TransactionCase): @tagged('post_install', '-at_install') class TestAssetsAdapter(TransactionCase): - def test_list_assets_returns_list(self): + def test_list_assets_returns_dict_with_assets(self): + # Phase 3 (fusion_accounting_assets) wired list_assets to return + # {count, total, assets} — consistent with bank_rec.list_unreconciled etc. adapter = get_adapter(self.env, 'assets') rows = adapter.list_assets() - self.assertIsInstance(rows, list) + self.assertIsInstance(rows, dict) + self.assertIn('assets', rows) + self.assertIsInstance(rows['assets'], list)