Skip to content

Commit

Permalink
resolved flake error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh619-sudo committed Sep 3, 2024
1 parent 9be8529 commit aeaa4b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/xero/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def create_payment(workspace_id):
)

if expense_group_reimbursement_status:

skip_payment = validate_for_skipping_payment(bill=bill, workspace_id=workspace_id)
if skip_payment:
continue
Expand Down
3 changes: 1 addition & 2 deletions tests/test_xero/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import random
from datetime import datetime, timedelta, timezone
from unittest import mock
from dateutil.relativedelta import relativedelta

from django_q.models import Schedule
from fyle_accounting_mappings.models import ExpenseAttribute, Mapping
Expand Down Expand Up @@ -1148,7 +1147,7 @@ def test_skipping_payment(mocker, db):

task_log = TaskLog.objects.get(workspace_id=workspace_id, type='CREATING_PAYMENT', task_id='PAYMENT_{}'.format(bill.expense_group.id))
assert task_log.updated_at == updated_at

now = datetime.now().replace(tzinfo=timezone.utc)
updated_at = now - timedelta(days=25)
# Update created_at to more than 2 months ago (more than 60 days)
Expand Down

0 comments on commit aeaa4b7

Please sign in to comment.