Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions tests/test_clock_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ def test_chime_allowed_next_interval(self):
# Should chime at 4:00
assert service.should_chime_now(time(16, 0, 0)) == "hour"

def test_reset_chime_tracking(self):
"""Reset should allow chime again at same minute."""
from accessiclock.services.clock_service import ClockService

service = ClockService()
service.chime_hourly = True

test_time = time(15, 0, 0)
# Chime once
assert service.should_chime_now(test_time) == "hour"
service.mark_chimed(test_time)
# Blocked
assert service.should_chime_now(test_time) is None
# Reset tracking
service.reset_chime_tracking()
# Should chime again
assert service.should_chime_now(test_time) == "hour"


class TestGetCurrentHour:
"""Test hour extraction for hourly chimes."""
Expand Down