Mock out db properly so tests pass