Skip to content

Test spreadsheet 1641#1673

Merged
Meatchema merged 13 commits intodevelopmentfrom
test_spreadsheet_1641
Feb 12, 2026
Merged

Test spreadsheet 1641#1673
Meatchema merged 13 commits intodevelopmentfrom
test_spreadsheet_1641

Conversation

@Arohasina
Copy link
Contributor

Issue Description

Fixes #1641
-The spreadsheet integration tests in test_spreadsheet.py were broken after recent changes to the volunteer reporting logic. Several functions were renamed, return formats were updated, and additional event filtering logic was introduced, causing the existing tests to fail or become outdated. This PR updates the test suite to correctly reflect the current reporting behavior and restores full test coverage for the spreadsheet generation pipeline.

Changes

-Updated spreadsheet integration tests to match the current volunteerSpreadsheet.py
-Refactored tests to unpack (columns, rows) results consistently across reporting functions.
-Aligned test data with new event filtering requirements, including isService, isCanceled, and deletionDate.
-Replaced old test targets with current equivalents such as repeatParticipants, repeatParticipantsPerProgram, totalHours, and totalHoursByProgram.
-Improved test coverage for spreadsheet-related reporting functions, including retention rates, volunteer summaries, program totals, demographic breakdowns, and term exports.
-Verified spreadsheet generation runs successfully for multiple academic years using the updated test dataset.

Testing

  • git checkout test_spreadsheet_1641
  • Run the full spreadsheet test suite locally with pytest tests/code/test_spreadsheet.py -vv -s

@Kafui123
Copy link
Contributor

All my comments have been addressed. Looks good to me.

@Meatchema Meatchema self-requested a review February 10, 2026 20:54
Copy link
Contributor

@Meatchema Meatchema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This result occured both before and after I tried a database reset from backup
Besides run this instruction was there anything else I needed to do?: pytest tests/code/test_spreadsheet.py -vv -s

Image

@Arohasina
Copy link
Contributor Author

Hi @Meatchema, I think it was caused by the duplicate primary key values in the test fixtures. I just fixed it. Could you try running it again?

This result occured both before and after I tried a database reset from backup Besides run this instruction was there anything else I needed to do?: pytest tests/code/test_spreadsheet.py -vv -s

Image

@github-actions
Copy link

View Code Coverage

Copy link
Contributor

@Meatchema Meatchema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works now:

Image

@Meatchema Meatchema merged commit 0c29273 into development Feb 12, 2026
5 checks passed
@Meatchema Meatchema deleted the test_spreadsheet_1641 branch February 12, 2026 20:46
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.

Fix and Re-Enable Report Spreadsheet Integration Tests

3 participants