devserver: Fix fileinfo API

The 'fileinfo' devserver API is broken since since there was no unittest
for it. This CL fixes the API and adds unittest for it.

BUG=chromium:1018237
TEST=devserver_integration_test.py
TEST=./devserver.py --static_dir=/mnt/host/source/devserver/static
then:
curl http://127.0.0.1:8080/api/fileinfo/reef-release/R80-12622.0.0/update.gz
(assuming reef-release/R80-12622.0.0/full_update has been staged.)
returns:
{"sha256": "HPVNNZq9/rZG1imLrACEhRskstwohQpX5gjQJLCAXZ8=", "size": 1010445126}

Change-Id: I6876b9004bc264aba131b41ac158e544fe704711
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/1884310
Tested-by: Amin Hassani <[email protected]>
Reviewed-by: Mike Frysinger <[email protected]>
Reviewed-by: Amin Hassani <[email protected]>
2 files changed