-
Notifications
You must be signed in to change notification settings - Fork 24
Fix/expense test imports #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Corrected `ModuleNotFoundError` in expense tests by changing `from app.main import app` to `from main import app`. This aligns with the project structure and how group tests perform their imports. - Updated the GitHub Actions workflow (`run-tests.yml`) to use `python -m pytest` instead of just `pytest`. This resolves a `pytest-asyncio` plugin discovery issue encountered during testing, ensuring CI runs the tests with the correct Python environment context.
✅ Deploy Preview for splitwizer canceled.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat/expense-service #24 +/- ##
=======================================================
Coverage ? 60.56%
=======================================================
Files ? 29
Lines ? 2493
Branches ? 0
=======================================================
Hits ? 1510
Misses ? 983
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…anaging expenses (#23) * feat: Add expense service with endpoints for creating, listing, and managing expenses - Integrated expense routes into the main application. - Created test suite for expense service, including API endpoint tests and validation checks. - Implemented PATCH endpoint validation for updating expenses. - Developed algorithms for normal and advanced settlement calculations. - Added unit tests for expense split validation and settlement algorithms. - Established directory structure for organizing expense-related tests. * feat: Enhance PATCH endpoint with improved validation, error handling, and debug functionality * Fix/expense test imports (#24) * Fix expense test imports and CI test command - Corrected `ModuleNotFoundError` in expense tests by changing `from app.main import app` to `from main import app`. This aligns with the project structure and how group tests perform their imports. - Updated the GitHub Actions workflow (`run-tests.yml`) to use `python -m pytest` instead of just `pytest`. This resolves a `pytest-asyncio` plugin discovery issue encountered during testing, ensuring CI runs the tests with the correct Python environment context. * Update code structure for improved readability and maintainability --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * feat(tests): Enhance expense service tests with advanced algorithm scenarios and debugging * fix(review): fix review comments for vrajpatelll30 * Revert "fix(review): fix review comments for vrajpatelll30" This reverts commit 3b45a4b. * feat(groups): Enhance group member details with user information and update response models * chore(tests): Remove obsolete test scripts for expense service and PATCH endpoint * feat(groups): Add method to enrich group members with user details and refactor existing member enrichment logic * feat(expenses): Add ObjectId validation for group and expense retrieval in create_expense and get_expense_by_id methods * Increase test coverage for ExpenseService (#26) Adds comprehensive tests for various methods in the ExpenseService class, including: - list_group_expenses (with filters and pagination) - delete_expense - create_manual_settlement - get_group_settlements (with filters and pagination) - get_settlement_by_id - update_settlement_status - delete_settlement - get_user_balance_in_group - get_friends_balance_summary - get_overall_balance_summary - get_group_analytics These tests cover success cases, error handling, and edge cases to improve the robustness and reliability of the expense service. Fixes several issues in existing tests related to ObjectId handling and mocking of async database operations. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Vraj Patel <[email protected]>
No description provided.