fix(fusion_accounting_ai): align legacy assets-adapter test with Phase 3 return shape
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
This commit is contained in:
@@ -140,7 +140,11 @@ class TestFollowupAdapter(TransactionCase):
|
|||||||
|
|
||||||
@tagged('post_install', '-at_install')
|
@tagged('post_install', '-at_install')
|
||||||
class TestAssetsAdapter(TransactionCase):
|
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')
|
adapter = get_adapter(self.env, 'assets')
|
||||||
rows = adapter.list_assets()
|
rows = adapter.list_assets()
|
||||||
self.assertIsInstance(rows, list)
|
self.assertIsInstance(rows, dict)
|
||||||
|
self.assertIn('assets', rows)
|
||||||
|
self.assertIsInstance(rows['assets'], list)
|
||||||
|
|||||||
Reference in New Issue
Block a user