MCPcopy Create free account
hub / github.com/imroc/req / TestSetFileUploadCheck

Function TestSetFileUploadCheck

request_test.go:899–906  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

897}
898
899func TestSetFileUploadCheck(t *testing.T) {
900 c := tc()
901 resp, err := c.R().SetFileUpload(FileUpload{}).Post("/multipart")
902 tests.AssertErrorContains(t, err, "missing param name")
903 tests.AssertErrorContains(t, err, "missing filename")
904 tests.AssertErrorContains(t, err, "missing file content")
905 tests.AssertEqual(t, 0, len(resp.Request.uploadFiles))
906}
907
908func TestUploadMultipart(t *testing.T) {
909 m := make(map[string]any)

Callers

nothing calls this directly

Calls 6

AssertErrorContainsFunction · 0.92
AssertEqualFunction · 0.92
tcFunction · 0.85
SetFileUploadMethod · 0.80
RMethod · 0.80
PostMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…