MCPcopy Index your code
hub / github.com/imroc/req / TestClientClone

Function TestClientClone

client_test.go:561–575  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

559}
560
561func TestClientClone(t *testing.T) {
562 c1 := tc().DevMode().
563 SetCommonHeader("test", "test").
564 SetCommonCookies(&http.Cookie{
565 Name: "test",
566 Value: "test",
567 }).SetCommonQueryParam("test", "test").
568 SetCommonPathParam("test", "test").
569 SetCommonRetryCount(2).
570 SetCommonFormData(map[string]string{"test": "test"}).
571 OnBeforeRequest(func(c *Client, r *Request) error { return nil })
572
573 c2 := c1.Clone()
574 assertClone(t, c1, c2)
575}
576
577func TestDisableAutoReadResponse(t *testing.T) {
578 testWithAllTransport(t, testDisableAutoReadResponse)

Callers

nothing calls this directly

Calls 11

tcFunction · 0.85
assertCloneFunction · 0.85
OnBeforeRequestMethod · 0.80
SetCommonFormDataMethod · 0.80
SetCommonRetryCountMethod · 0.80
SetCommonPathParamMethod · 0.80
SetCommonQueryParamMethod · 0.80
SetCommonCookiesMethod · 0.80
SetCommonHeaderMethod · 0.80
DevModeMethod · 0.80
CloneMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…