move db and testpat to tests/