Added a test that works, but I have no idea why it connects to the DB in the test but does not connect to the DB when I run the actual program.