fix(tests): exception ID collision test does not force ID collision #250

Open
opened 2026-10-03 09:11:49 +00:00 by gabogg · 0 comments
Owner

Follow-up for PR #177 (next-day settings activation, #114) addressing pass-4 review finding P3-3:

Scope

In tests/test_next_day_settings_activation.py:1045 (test_p1_cancelling_pending_exception_colliding_with_active_holiday_id_and_404), occupancy_pending_changes uses AUTOINCREMENT. Because previous test executions increment the autoincrement counter and table cleanup does not reset sqlite_sequence, pending_id is greater than 1 (e.g. 26). As a result, the test does not actually test a colliding ID against occupancy_holidays.id = 1.

Acceptance Criteria

  • Reset sqlite_sequence or insert the active holiday with id = pending_id.
  • Assert holiday.id == pending_id to guarantee true ID collision during testing.

Refs #177, #114.

Follow-up for PR #177 (next-day settings activation, #114) addressing pass-4 review finding P3-3: ### Scope In `tests/test_next_day_settings_activation.py:1045` (`test_p1_cancelling_pending_exception_colliding_with_active_holiday_id_and_404`), `occupancy_pending_changes` uses `AUTOINCREMENT`. Because previous test executions increment the autoincrement counter and table cleanup does not reset `sqlite_sequence`, `pending_id` is greater than 1 (e.g. 26). As a result, the test does not actually test a colliding ID against `occupancy_holidays.id = 1`. ### Acceptance Criteria - Reset `sqlite_sequence` or insert the active holiday with `id = pending_id`. - Assert `holiday.id == pending_id` to guarantee true ID collision during testing. Refs #177, #114.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gabogg/hikcentral#250
No description provided.