move test db setup/teardown to package test such that it can be used by other package