From 008e82d1de2940f169c68d0537f83efe0d875a84 Mon Sep 17 00:00:00 2001 From: Dakota Date: Tue, 3 Dec 2024 18:06:44 +0100 Subject: [PATCH] tests: fix is_advent_calendar stubbing --- tests/test_user_loot_infos.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_user_loot_infos.py b/tests/test_user_loot_infos.py index 2a5bc54..7cdf456 100644 --- a/tests/test_user_loot_infos.py +++ b/tests/test_user_loot_infos.py @@ -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}) \ No newline at end of file