diff --git a/screen_locker/tests/test_manual_workout_features_part2.py b/screen_locker/tests/test_manual_workout_features_part2.py index 617c04b..8c0068c 100644 --- a/screen_locker/tests/test_manual_workout_features_part2.py +++ b/screen_locker/tests/test_manual_workout_features_part2.py @@ -2,14 +2,12 @@ from __future__ import annotations -from datetime import date, datetime, time import pathlib from typing import TYPE_CHECKING from unittest.mock import MagicMock, patch import pytest -from screen_locker._day import today_str from screen_locker._log_mixin import RecordResult from screen_locker.tests.conftest import create_locker @@ -28,13 +26,6 @@ if TYPE_CHECKING: from pathlib import Path -def _today_at(hhmm: str) -> float: - """Unix time of ``hhmm`` local on the locker's today.""" - hours, minutes = (int(p) for p in hhmm.split(":")) - day = date.fromisoformat(today_str()) - return datetime.combine(day, time(hours, minutes)).astimezone().timestamp() - - @pytest.mark.usefixtures("pre_ladder") class TestApplyWorkoutCredit: """Tests for ScreenLocker._apply_workout_credit under the multi-per-day rule. @@ -129,9 +120,7 @@ class TestApplyWorkoutCredit: assert result.shutdown_adjusted is False assert result.extra_bonus_delta == 60 locker._try_adjust_shutdown_for_workout.assert_not_called() - locker._adjust_shutdown_time_by.assert_called_once_with( - 60, at=_today_at("17:00") - ) + locker._adjust_shutdown_time_by.assert_called_once_with(60) def test_additional_verified_workout_earns_plus_one_hour( self, mock_tk: MagicMock, mock_sys_exit: MagicMock, tmp_path: Path @@ -172,4 +161,4 @@ class TestApplyWorkoutCredit: assert result.shutdown_adjusted is False assert result.extra_bonus_delta == 60 locker._try_adjust_shutdown_for_workout.assert_not_called() - locker._adjust_shutdown_time_by.assert_called_once_with(60, at=None) + locker._adjust_shutdown_time_by.assert_called_once_with(60) diff --git a/screen_locker/tests/test_screen_lock_coverage_part2.py b/screen_locker/tests/test_screen_lock_coverage_part2.py index 821d732..bcdf4aa 100644 --- a/screen_locker/tests/test_screen_lock_coverage_part2.py +++ b/screen_locker/tests/test_screen_lock_coverage_part2.py @@ -42,7 +42,7 @@ class TestUnlockScreenExtras: ): locker.unlock_screen() - locker._adjust_shutdown_time_by.assert_called_once_with(60, at=None) + locker._adjust_shutdown_time_by.assert_called_once_with(60) def test_extra_bonus_delta_displayed( self,