Mocked out api.Conn, starting meaningful tests.

Mocked out HTTPConnecion and HTTPResponse in test_api.py so that
meaningful tests can be run without actually using an ES server.
Basically the approach will be to compare the curl element of responses
to what is expected.
Api test cases complete.