Closed tweddielin closed 7 years ago
Merge conflict
@@ master #25 diff @@
==========================================
Files 4 4
Lines 116 140 +24
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 82 103 +21
- Misses 34 37 +3
Partials 0 0
Powered by Codecov. Last update 69c131c...b78f28c
Codecov is right; since we're adding new backend code here, we should put in a test for the API call.
Check out this example, I added some utils to remove boilerplate for setting up API tests, so each endpoint test looks something like this: https://github.com/dssg/tyra/blob/master/tests/test_evaluations_modelprediction.py
You basically just add a json file to the proper path (sample_json/evaluations/1/metric.json
in this case) representing expected API output, and then add the database data in the test that you expect to produce that JSON.
Should we open another issue specifically for the API tests?
Looks like Codecov is too shy to comment on the same PR twice, but coverage is up to 74% from the 70% in master, so that's awesome. Merging.