[PATCH] testbot: Better wrap the database backend code.