I wrote some very crude instructions on how to do blackbox / integration testing. We should formalize that a bit and put it into a more permanent place:
Repeat a couple times (at least twice, but 10 times or more also works):
$ curl -i -k -XPOST -H "Content-Type: application/json" -H "X-Nickname: foo" http://localhost/v1/submit -d '{"items": [{"lat": 1.23, "lon": 3.45, "altitude": 10, "accuracy": 10, "radio": "gsm", "cell": [{"mcc": 1, "mnc": 1, "lac": 2, "cid": 3, "signal": -70}]}]}'
HTTP/1.1 204 No Content
Server: gunicorn/0.14.6
Date: Mon, 25 Nov 2013 18:51:04 GMT
Connection: close
Right away there's no result found yet:
$ curl -i -k -XPOST -H "Content-Type: application/json" http://localhost/v1/search -d '{"radio": "gsm", "cell": [{"mcc": 1, "mnc": 1, "lac": 2, "cid": 3}]}'
HTTP/1.1 200 OK
Server: gunicorn/0.14.6
Date: Mon, 25 Nov 2013 18:53:06 GMT
Connection: close
Content-Type: application/json; charset=UTF-8
Content-Length: 23
{"status": "not_found"}
After the async task has run (~6 every minutes), there should be a result:
$ curl -i -k -XPOST -H "Content-Type: application/json" http://localhost/v1/search -d '{"radio": "gsm", "cell": [{"mcc": 1, "mnc": 1, "lac": 2, "cid": 3}]}'
HTTP/1.1 200 OK
Server: gunicorn/0.14.6
Date: Mon, 25 Nov 2013 18:54:08 GMT
Connection: close
Content-Type: application/json; charset=UTF-8
Content-Length: 71
{"status": "ok", "lat": 1.2300000, "lon": 3.4500000, "accuracy": 35000}