wings/remote/client_test.go
2021-01-10 23:47:22 +00:00

20 lines
301 B
Go

package remote
import (
"net/http"
"net/http/httptest"
)
func createTestClient(h http.HandlerFunc) (*client, *httptest.Server) {
s := httptest.NewServer(h)
c := &client{
httpClient: s.Client(),
baseUrl: s.URL,
retries: 1,
tokenId: "testid",
token: "testtoken",
}
return c, s
}