Only connect to configured database during visualization testing

Closes #421