Changed functional tests so they would write to test db