You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Fixes#1524
### Time to review: __3 mins__
## Changes proposed
Restructured the tests for the v0.1 opportunity endpoint
Split the search and get endpoints into their own files
## Context for reviewers
I did not add or remove any tests, just adjusted how they were organized
to hopefully be easier to parse.
The setup for a few tests was altered to use a more consistent pattern /
reuse existing utility methods. This adjustment did result in some tests
running faster (due to less teardown/recreation of data between tests).
Unfortunately, search has a lot of scenarios that need to be tested, so
there is only so much that can be done to minimize the length of that
file. I could split the search tests across several files (each of the
class
## Additional information
To confirm I didn't accidentally add/delete any tests, the output from
running `make test` before and after:
BEFORE:
![Screenshot 2024-03-27 at 11 46 53
AM](https://github.com/HHS/simpler-grants-gov/assets/46358556/5826fa02-72a5-4b30-bdcd-431fc457e3a5)
AFTER:
![Screenshot 2024-03-27 at 11 46 34
AM](https://github.com/HHS/simpler-grants-gov/assets/46358556/c072850c-c7c3-41eb-8b5a-c00564e47af3)
After is slightly faster due to adjusting the test setup to be less
repetitive for a few tests.
Summary
Some of our tests, especially https://github.com/HHS/simpler-grants-gov/blob/main/api/tests/src/api/opportunities_v0_1/test_opportunity_route.py - are long. This is good that we have a lot of tests, but can be difficult to read through / know where to update it. We should take a bit of time to clean up these tests and split them across files / organize into a more readable format.
Acceptance criteria
The text was updated successfully, but these errors were encountered: