Adding tests for db operations.

Not yet working. Some notes.
 - Error on cherrypy.requests.db .
 - Tests seem to block even with cherrypy.engine.exit()