Moves test database setup/teardown into a fixture

Change-Id: Ic59eb0a6f7d20abfcc2966a7162406cf541306b2
Merge "Moves test database setup/teardown into a fixture"