mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-13 11:22:21 +00:00
Add hide_missing_ids filter to transaction queries
- Add hide_missing_ids parameter to database functions to filter out transactions without internalTransactionId - Update API routes to support the new filter parameter - Update unit tests to include the new parameter - Add opencode.json configuration file
This commit is contained in:
committed by
Elisiário Couto
parent
c5fd26cb3e
commit
947342e196
@@ -166,6 +166,7 @@ class TestTransactionsAPI:
|
||||
min_amount=-50.0,
|
||||
max_amount=0.0,
|
||||
search="Coffee",
|
||||
hide_missing_ids=True,
|
||||
)
|
||||
|
||||
def test_get_transactions_empty_result(
|
||||
|
||||
@@ -99,6 +99,7 @@ class TestDatabaseService:
|
||||
min_amount=None,
|
||||
max_amount=None,
|
||||
search=None,
|
||||
hide_missing_ids=True,
|
||||
)
|
||||
|
||||
async def test_get_transactions_from_db_with_filters(
|
||||
@@ -129,6 +130,7 @@ class TestDatabaseService:
|
||||
min_amount=-50.0,
|
||||
max_amount=0.0,
|
||||
search="Coffee",
|
||||
hide_missing_ids=True,
|
||||
)
|
||||
|
||||
async def test_get_transactions_from_db_sqlite_disabled(self, database_service):
|
||||
@@ -158,7 +160,9 @@ class TestDatabaseService:
|
||||
)
|
||||
|
||||
assert result == 42
|
||||
mock_get_count.assert_called_once_with(account_id="test-account-123")
|
||||
mock_get_count.assert_called_once_with(
|
||||
account_id="test-account-123", hide_missing_ids=True
|
||||
)
|
||||
|
||||
async def test_get_transaction_count_from_db_with_filters(self, database_service):
|
||||
"""Test getting transaction count with filters."""
|
||||
@@ -178,6 +182,7 @@ class TestDatabaseService:
|
||||
date_from="2025-09-01",
|
||||
min_amount=-100.0,
|
||||
search="Coffee",
|
||||
hide_missing_ids=True,
|
||||
)
|
||||
|
||||
async def test_get_transaction_count_from_db_sqlite_disabled(
|
||||
|
||||
Reference in New Issue
Block a user