test(penthouse): add idempotency and multi-ticket regression tests #20

Merged
abiba-bot merged 1 commits from fm/denya-penthouse-tests into main 2026-10-02 13:58:27 +00:00
Owner

Follow-up for PR #19 (86669b6): closes the two missing test assertions from the 057.msg status request.

Tests added

  1. test_penthouse_consolidation_is_idempotent: calls seed_units twice, asserts nothing changes (count, ids, floors, ticket refs)
  2. test_penthouse_consolidation_repoints_multiple_tickets: puts 2 tickets on the legacy PH1E- row and asserts BOTH are re-pointed to the clean PH1E row
  3. test_idempotency_assertion_catches_delete: meta-test — deletes a clean row, proves the count==4 assertion fails
  4. test_idempotency_assertion_catches_duplicate: meta-test — adds a new penthouse row (PH3E), proves the count==4 assertion fails (same-code duplicates are blocked by the UNIQUE constraint)

All 13 tests pass. Full suite: 123 passed.

Follow-up for PR #19 (86669b6): closes the two missing test assertions from the 057.msg status request. ## Tests added 1. **test_penthouse_consolidation_is_idempotent**: calls seed_units twice, asserts nothing changes (count, ids, floors, ticket refs) 2. **test_penthouse_consolidation_repoints_multiple_tickets**: puts 2 tickets on the legacy PH1E- row and asserts BOTH are re-pointed to the clean PH1E row 3. **test_idempotency_assertion_catches_delete**: meta-test — deletes a clean row, proves the count==4 assertion fails 4. **test_idempotency_assertion_catches_duplicate**: meta-test — adds a new penthouse row (PH3E), proves the count==4 assertion fails (same-code duplicates are blocked by the UNIQUE constraint) All 13 tests pass. Full suite: 123 passed.
abiba-bot added 1 commit 2026-10-02 13:48:19 +00:00
Closes the two coverage gaps from the parent's 057.msg:
- test_penthouse_consolidation_is_idempotent: second seed_units pass is a no-op
- test_penthouse_consolidation_repoints_multiple_tickets: all tickets on legacy row re-pointed
- Meta-tests prove the idempotency assertion catches delete/duplicate bugs
abiba-bot merged commit 2579c7ebbf into main 2026-10-02 13:58:27 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SyslogSolution/denya-onecare#20