Skip to content

Commit

Permalink
tests: fix is_advent_calendar stubbing
Browse files Browse the repository at this point in the history
  • Loading branch information
MalikAza committed Dec 3, 2024
1 parent 35e6953 commit 008e82d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_user_loot_infos.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def test_journa_not_done_bonus_needed(self) -> None:
now = datetime.now(pytz.timezone('Europe/Paris')).strftime('%Y-%m-%d')
loot_infos_stub.bonus_when.strftime.return_value = now

with patch('pyZUnivers.user.UserLootInfos', return_value=loot_infos_stub):
with (
patch('pyZUnivers.user.UserLootInfos', return_value=loot_infos_stub),
patch('pyZUnivers.user.is_advent_calendar', return_value=False)
):
result = pyZUnivers.User.get_checker('powaza')

self.assertEqual(result, {'journa': False, 'bonus': False, 'advent': None})

0 comments on commit 008e82d

Please sign in to comment.