Skip to content

Commit

Permalink
Fix tests.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JJtan2002 authored Jun 30, 2024
1 parent a777dd2 commit 4c72fb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/budget_tracking/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_recurrent_transaction(self):
def test_get_monthly_earnings(self):
one_month_ago = datetime.datetime.today() - relativedelta(months=1)
out_of_range = one_month_ago - relativedelta(days=1)
in_range = datetime.datetime.today() - relativedelta(days=1)
in_range = datetime.datetime.today()

earnings_in_range = self.factory.create_transaction_filled(self.wallet, type="Earning", value=150)
earning_in_range2 = self.factory.create_transaction_filled(self.wallet, type="Earning", value=50, date=in_range)
Expand All @@ -65,7 +65,7 @@ def test_get_monthly_earnings(self):
def test_get_monthly_expenses(self):
one_month_ago = datetime.datetime.today() - relativedelta(months=1)
out_of_range = one_month_ago - relativedelta(days=1)
in_range = datetime.datetime.today() + relativedelta(days=1)
in_range = datetime.datetime.today()

expense_in_range = self.factory.create_transaction_filled(self.wallet, type="Expense", value=150)
expense_in_range2 = self.factory.create_transaction_filled(self.wallet, type="Expense", value=50, date=in_range)
Expand All @@ -78,4 +78,4 @@ def test_get_monthly_expenses(self):

expected_value = 200
monthly_earning = self.wallet.get_monthly_expenses()
self.assertEqual(expected_value, monthly_earning)
self.assertEqual(expected_value, monthly_earning)

0 comments on commit 4c72fb5

Please sign in to comment.