Skip to content

Conversation

codytodonnell
Copy link
Collaborator

The test_api_summary function was testing two different endpoints together, /api/summary and /api/stats. This PR separates that test into two. The summary test is also improved now to test both the success of the response and the shape of the data by comparing it to the expected DatabaseSummary fields.

@codytodonnell codytodonnell requested a review from eecavanna July 16, 2025 23:21
@codytodonnell codytodonnell force-pushed the 1679-refactor-tests-stats-endpoint branch from f526fc4 to 6388e31 Compare July 16, 2025 23:28
Copy link
Collaborator

@eecavanna eecavanna left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for splitting up the test so each test is only focused on a single API endpoint. I'm OK with this being merged in as is.

@eecavanna eecavanna changed the title Refactor the api summary and stats tests to be two independent tests Refactor API summary and stats test to be two independent tests Jul 16, 2025
@codytodonnell codytodonnell merged commit ef3a7a2 into main Jul 16, 2025
2 checks passed
@codytodonnell codytodonnell deleted the 1679-refactor-tests-stats-endpoint branch July 16, 2025 23:49
@codytodonnell codytodonnell linked an issue Jul 25, 2025 that may be closed by this pull request
2 tasks
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.

Refactor tests targeting /api/stats API endpoint
2 participants