Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipao-mx committed Nov 6, 2023
1 parent 5e89180 commit 1e78215
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion speid/tasks/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
get_prior_business_day,
)
from stpmex.exc import EmptyResultsError, InvalidFutureDateError
from stpmex.resources import Orden

from speid.helpers import callback_helper
from speid.helpers.transaction_helper import (
Expand Down
14 changes: 8 additions & 6 deletions tests/tasks/test_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,12 +493,14 @@ def test_retry_incoming_transaction(
@pytest.mark.vcr
def test_task_apply_missing_deposits(mock_send_task):
fecha_operacion = get_current_working_day()
deposits_count = Transaction.objects(
existing_deposits = Transaction.objects(
tipo=TipoTransaccion.deposito, fecha_operacion=fecha_operacion
).count()
).all()
breakpoint()
apply_missing_deposits()
new_deposits_count = Transaction.objects(
deposits = Transaction.objects(
tipo=TipoTransaccion.deposito, fecha_operacion=fecha_operacion
).count()
assert new_deposits_count - deposits_count == 3
mock_send_task.call_count == 3
).all()
assert len(deposits) - len(existing_deposits) == 3
assert mock_send_task.call_count == 3
assert all(d.estado is Estado.succeeded for d in deposits)

0 comments on commit 1e78215

Please sign in to comment.