Skip to content

refactor(tests): split event stats/attendance-api tests (Issue 1318) - #1335

Merged
leahpeker merged 1 commit into
mainfrom
refactor-split-event-stats-tests
Aug 8, 2026
Merged

leahpeker merged 1 commit into
mainfrom
refactor-split-event-stats-tests

Conversation

@leahpeker

Copy link
Copy Markdown
Collaborator

Summary

  • Splits backend/tests/test_event_stats.py into two files: helper unit tests stay in test_event_stats.py, API endpoint tests (TestStatsEndpoint, TestSetAttendance) move to a new test_event_attendance_api.py.
  • Pure mechanical move — no behavior change, no test content changed.
  • Done ahead of fix: 1318 - cancellation within 24 hours + show prior rsvp status #1323, which adds cancellation-lead-time tests to this file and would otherwise push it over the 500-line hard cap in .claude/rules/file-size.md.

Test plan

  • make agent-lint — clean
  • make agent-typecheck — clean
  • Targeted tests (test_event_stats.py, test_event_attendance_api.py) — 30/30 passed

… (Issue 1318)

test_event_stats.py mixed helper unit tests (_cancellations,
_resolve_cancelled_at, rsvp counts) with API endpoint tests
(TestStatsEndpoint, TestSetAttendance). Split the API endpoint
classes into test_event_attendance_api.py, which imports the
shared fixtures + _auth helper from test_event_stats.

No behavior change — pure move, done ahead of PR #1323 (which
would otherwise push this file over the 500-line hard cap).
@leahpeker
leahpeker force-pushed the refactor-split-event-stats-tests branch from f9294b0 to 7421b56 Compare August 8, 2026 14:25
@leahpeker
leahpeker merged commit c6a224c into main Aug 8, 2026
3 checks passed
@leahpeker
leahpeker deleted the refactor-split-event-stats-tests branch August 8, 2026 14:31
leahpeker added a commit that referenced this pull request Aug 8, 2026
test_event_attendance_api.py arrived from main (PR #1335 split it out
of test_event_stats.py) still referencing AttendanceStatus.NO_SHOW,
which this branch renamed to DIDNT_GO. No textual conflict since the
file is new here, so the rebase couldn't surface it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant