Fixed unit tests so they work with and without ssl