testools

package module
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTest

func CheckTest(prueba string, expected, response interface{}, a ...any)

func MultiPartFileForm added in v0.0.2

func MultiPartFileForm(path_files, field_name string, files_name []string, form map[string]string) (body *bytes.Buffer, content_type string, err error)

path_files ej: ./test_files field_name ej: endoscopia, voucher, foto_mascota, foto_usuario files_name ej: "gatito.jpg, perro.png"

func RandomNumber added in v0.0.2

func RandomNumber() string

Types

type Request added in v0.0.2

type Request struct {
	Endpoint    string //ej: create/files delete/x
	Method      string //ej: "PUT","GET"
	ContentType string //ej: multipart/form-data, application/json

	*model.Object
	Data []map[string]string

	ExpectedCode int
	*httptest.Server
	*cutkey.Cut
}

func (*Request) CutPost added in v0.0.2

func (r *Request) CutPost() ([]model.Response, int, error)

func (*Request) Get added in v0.0.2

func (r *Request) Get(data_in ...map[string]string) ([]model.Response, int, error)

func (*Request) SendRequest added in v0.0.2

func (r *Request) SendRequest(body []byte) ([]model.Response, int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL