Add database test to unittest