Split out common test infrastructure from security_templates_test, make tests HTTPS, use the http.Client provided by httptest