From d4cf6b83d2039852ac50f2d9cf49c40552362541 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 5 Apr 2021 17:57:40 +0200 Subject: Fixed scope of test helpers in navitia_api_client package --- pkg/navitia_api_client/client_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/navitia_api_client/client_test.go') diff --git a/pkg/navitia_api_client/client_test.go b/pkg/navitia_api_client/client_test.go index 332b222..df23790 100644 --- a/pkg/navitia_api_client/client_test.go +++ b/pkg/navitia_api_client/client_test.go @@ -9,7 +9,7 @@ import ( ) // package utilities -func NewTestClient(ts *httptest.Server) *Client { +func newTestClient(ts *httptest.Server) *Client { return &Client{ baseURL: fmt.Sprintf(ts.URL), httpClient: ts.Client(), @@ -17,7 +17,7 @@ func NewTestClient(ts *httptest.Server) *Client { } } -func NewTestClientFromFilename(t *testing.T, filename string) (*Client, *httptest.Server) { +func newTestClientFromFilename(t *testing.T, filename string) (*Client, *httptest.Server) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { page, err := ioutil.ReadFile(filename) if err != nil { @@ -25,7 +25,7 @@ func NewTestClientFromFilename(t *testing.T, filename string) (*Client, *httptes } w.Write(page) })) - return NewTestClient(ts), ts + return newTestClient(ts), ts } // tests -- cgit v1.2.3