Initial commit
This commit is contained in:
commit
02a6dabcfb
62 files changed
+15751
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
)
|
||||
|
||||
// testServer creates a test HTTP server with the given handler
|
||||
func testServer(handler http.HandlerFunc) *httptest.Server {
|
||||
return httptest.NewServer(handler)
|
||||
}
|
||||
|
||||
// newTestClient creates a client pointing to the test server
|
||||
func newTestClient(serverURL string) *Client {
|
||||
return NewClient(ClientConfig{
|
||||
BaseURL: serverURL,
|
||||
Token: "test-token",
|
||||
Language: "en",
|
||||
Timeout: 5,
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user