improved tests to check db:'s status and not just rely on the functions erroring out, and added a new test