fix: fix fail test cases#94
Conversation
Confidence Score: 5/5Safe to merge — all changes are targeted test fixes and a minor defensive guard, with no logic regressions. Both P0/P1 concerns from the prior review round are resolved: the invalid No files require special attention.
|
| Filename | Overview |
|---|---|
| transaction_parser/transaction_parser/controllers/transaction.py | Adds empty-files guard with correct frappe.throw(msg=...) call (addressing the prior message= bug), adds i18n import, and simplifies _attach_file() since files is now always a list. |
| transaction_parser/tests/test_sales_order.py | Fixes failing tests: wraps file mock in a list to match the API contract, tightens spec with Mock(spec=File), and corrects exception assertion from ValidationError to DuplicateEntryError to match what validate_po_no actually throws. |
Reviews (4): Last reviewed commit: "fix: update error message for missing fi..." | Re-trigger Greptile
📝 WalkthroughWalkthroughThe PR changes Transaction.generate to require a list for its files parameter (type-annotated as 🚥 Pre-merge checks | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2b573786-30e6-4d5f-9592-1051cda720f4
📒 Files selected for processing (2)
transaction_parser/tests/test_sales_order.pytransaction_parser/transaction_parser/controllers/transaction.py
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 321454c8-35ec-41e3-8d80-cc47d3b57dab
📒 Files selected for processing (2)
transaction_parser/tests/test_sales_order.pytransaction_parser/transaction_parser/controllers/transaction.py
No description provided.