From 45bb31aba0209de38b3b9749c4ce7bd62a9e3a32 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 9 Dec 2025 18:32:04 +0900 Subject: [PATCH] fixup! WIP --- dibbler/queries/user_balance.py | 1 - tests/queries/test_product_stock.py | 3 +-- tests/queries/test_transaction_log.py | 2 ++ tests/queries/test_user_balance.py | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dibbler/queries/user_balance.py b/dibbler/queries/user_balance.py index 0778dec..b9dbf5c 100644 --- a/dibbler/queries/user_balance.py +++ b/dibbler/queries/user_balance.py @@ -196,7 +196,6 @@ def _user_balance_query( # trx_subset.c.type_ == TransactionType.THROW_PRODUCT, # recursive_cte.c.balance + trx_subset.c.amount, # ), - # Interest adjustment -> balance stays the same # Penalty adjustment -> balance stays the same else_=recursive_cte.c.balance, diff --git a/tests/queries/test_product_stock.py b/tests/queries/test_product_stock.py index 490ddde..3ff5f84 100644 --- a/tests/queries/test_product_stock.py +++ b/tests/queries/test_product_stock.py @@ -179,5 +179,4 @@ def test_product_stock_joint_transaction(sql_session: Session) -> None: assert product_stock(sql_session, product) == 5 - 3 -def test_product_stock_throw_away(sql_session: Session) -> None: - ... +def test_product_stock_throw_away(sql_session: Session) -> None: ... diff --git a/tests/queries/test_transaction_log.py b/tests/queries/test_transaction_log.py index 73cfc11..05f7d02 100644 --- a/tests/queries/test_transaction_log.py +++ b/tests/queries/test_transaction_log.py @@ -563,7 +563,9 @@ def test_transaction_log_combined_filter_product_transaction_id_transaction_type assert len(result) == 2 + # NOTE: see the corresponding TODO's above the function definition + def test_transaction_log_filtered_by_user_joint_transactions(sql_session: Session) -> None: ... def test_transaction_log_filtered_by_user_throw_away_transactions(sql_session: Session) -> None: ... diff --git a/tests/queries/test_user_balance.py b/tests/queries/test_user_balance.py index 3a9ec20..03d57a2 100644 --- a/tests/queries/test_user_balance.py +++ b/tests/queries/test_user_balance.py @@ -325,5 +325,6 @@ def test_user_balance_joint_transactions_changing_penalty(sql_session: Session): def test_user_balance_joint_transactions_penalty_interest_combined(sql_session: Session): pass + def test_user_balance_throw_away_products(sql_session: Session): pass