Closed maxachis closed 2 weeks 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
This is fine and good, but I'd really like to consider this a blocker: #297
Noted, and description updated!
Or, they could be completed concurrently!
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 towardsThis may be blocked by #297. Or, they could be completed concurrently.
TODO
helper_functions.py
tohelper_scripts
DynamicMagicMocks
class to its ownDynamicMagicMocks.py
file in thehelper_scripts
directory.DynamicMagicMocks
logic to tests to reduce boilerplate code.