Skip to content

Conversation

@RadCod3
Copy link
Owner

@RadCod3 RadCod3 commented Jan 18, 2026

This PR enables the disabled test case that was failing before due to a bug in Firefly III API.
Resolves #43

@coderabbitai
Copy link

coderabbitai bot commented Jan 18, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Updated get_available_budget API to use start_date and end_date parameters instead of start and end for improved naming consistency.
  • Tests

    • Activated and updated integration tests for the available budget functionality with proper response validation.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

The test for get_available_budget was updated to become active by removing the xfail marker. The test now uses corrected API parameters (start_date and end_date) and parses the response using the AvailableBudget model instead of raw data access, with assertions updated to reference model attributes.

Changes

Cohort / File(s) Summary
Test Updates
tests/integration/test_budgets.py
Removed xfail marker from test_get_available_budget; updated API payload parameters from start/end to start_date/end_date; changed response parsing from result.data to AvailableBudget.model_validate(result.structured_content); updated assertions to access model attributes (amount, currency_code, start_date, end_date) with isoformat representations

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A budget test hops into the light,
No more xfails clouding the sight,
With dates renamed and models aligned,
The API's response, perfectly signed,
Firefly's currencies now understood right! 💰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly describes the main change: fixing and updating a failing test for get_available_budget, which aligns with the changeset.
Description check ✅ Passed The description is related to the changeset - it mentions enabling a disabled test case and references issue #43, which matches the PR's purpose.
Linked Issues check ✅ Passed The PR updates the test to use correct API field names (start_date/end_date) and proper model validation, directly addressing issue #43's requirement to fix validation errors.
Out of Scope Changes check ✅ Passed All changes are within scope - the modifications to test_budgets.py are directly related to fixing the test case and resolving issue #43.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

@RadCod3 RadCod3 merged commit 01e2a45 into main Jan 18, 2026
5 checks passed
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.81%. Comparing base (72161b2) to head (86b321f).
⚠️ Report is 2 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage   99.81%   99.81%           
=======================================
  Files          15       15           
  Lines        2661     2661           
=======================================
  Hits         2656     2656           
  Misses          5        5           
Flag Coverage Δ
integration 99.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RadCod3 RadCod3 deleted the fix/43-get-available-budget branch January 18, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_available_budget fails due to Firefly III API returning currency_id as int instead of string

3 participants