Police-Data-Accessibility-Project / data-sources-app

An API and UI for using and maintaining the Data Sources database
MIT License
2 stars 5 forks source link

Refactor and consolidate testing logic #374

Closed maxachis closed 2 weeks ago

maxachis commented 1 month ago

While I'm very proud of all my beautiful unit and integration test children, they've got some redundant and boilerplate code which could be refactored and consolidated into less code that is more reusable.

The gold standard for good-looking tests is test_endpoints.py, which tests that expected endpoints can be called with the expected HTTP methods (and that disallowed HTTP methods are not called). Adding tests to that is trivially easy. That model probably can't be emulated for most of the more complex logic I'm testing, but it is a good model to strive towards

This may be blocked by #297. Or, they could be completed concurrently.

TODO

josh-chamberlain commented 1 month ago

This is fine and good, but I'd really like to consider this a blocker: https://github.com/Police-Data-Accessibility-Project/data-sources-app/issues/297

maxachis commented 1 month ago

This is fine and good, but I'd really like to consider this a blocker: #297

Noted, and description updated!

josh-chamberlain commented 1 month ago

Or, they could be completed concurrently!