Verifies the bank_rec_bootstrap migration step (a) creates precedents from existing partial.reconcile rows, (b) is idempotent on re-run, and (c) refreshes the MV without erroring. Three TransactionCase tests: - test_bootstrap_creates_precedents_from_existing_reconciles seeds two reconciles via the engine, wipes the auto-recorded precedents, then asserts the bootstrap produces source='backfill' precedents. - test_bootstrap_step_idempotent runs the bootstrap twice and asserts the second pass creates zero new precedents. - test_bootstrap_refreshes_mv_without_error runs the bootstrap on a clean partner and asserts no exception is raised and the result dict reports MV + pattern refresh outcomes. Implementation fixes uncovered by these tests: - precedent_backfill.backfill_precedents now pre-filters account.partial.reconcile to rows that touch a bank statement line on either side. Previously it walked every partial in the DB; on the westin-v19 dev DB that's 16k rows and the default limit=10000 missed the newest test fixtures (highest IDs). - backfill skips the periodic env.cr.commit() when running under a TestCursor, since committing inside a test breaks the rollback. Test count: 139 -> 142. Made-with: Cursor
22 lines
789 B
Python
22 lines
789 B
Python
from . import test_memo_tokenizer
|
|
from . import test_exchange_diff
|
|
from . import test_matching_strategies
|
|
from . import test_ai_suggestion_lifecycle
|
|
from . import test_precedent_lookup
|
|
from . import test_pattern_extraction
|
|
from . import test_confidence_scoring
|
|
from . import test_reconcile_engine_unit
|
|
from . import test_reconcile_engine_property
|
|
from . import test_factories
|
|
from . import test_reconcile_engine_integration
|
|
from . import test_bank_rec_prompt
|
|
from . import test_bank_rec_adapter
|
|
from . import test_bank_rec_tools
|
|
from . import test_legacy_tools_refactor
|
|
from . import test_mv_unreconciled
|
|
from . import test_cron_methods
|
|
from . import test_controller
|
|
from . import test_auto_reconcile_wizard
|
|
from . import test_bulk_reconcile_wizard
|
|
from . import test_migration_round_trip
|