fix(test): align delete-item integration with authoritative receipt totals#17
Conversation
Summary of ChangesHello @cgoncalves94, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a CI failure by updating an integration test to align with the current backend behavior regarding receipt totals. Previously, the test expected the total to recompute after an item deletion, but the backend now preserves the original total unless explicitly modified. The change ensures the test accurately reflects this authoritative total behavior, preventing future false negatives in CI. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request fixes an integration test for deleting a receipt item to align with new backend behavior where the receipt total is not automatically recomputed. The changes to test_delete_receipt_item correctly reflect this new logic. However, I've pointed out a potential inconsistency with another test, test_create_receipt_item, which still seems to expect the old behavior of total recomputation. This could indicate a gap in test coverage or an incomplete fix, and should be addressed to ensure the test suite is consistent and reliable.
Summary
tests/integration/receipt/test_receipt_endpoints.py::test_delete_receipt_item.Root Cause
total_after_create - item_total), but backend behavior now preservesreceipt.total_amountunless explicitly changed via reconciliation/update flows.Change
test_delete_receipt_item, assert responsetotal_amountequals the original receipt total after deletion.Validation
70513a3).