Fix database test case setup