adjust tests so that they work with test database