You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
278 B
16 lines
278 B
8 years ago
|
package http
|
||
|
|
||
|
import (
|
||
|
"github.com/stretchr/testify/mock"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
type TestRoundTripper struct {
|
||
|
mock.Mock
|
||
|
}
|
||
|
|
||
|
func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
|
||
|
args := t.Called(req)
|
||
|
return args.Get(0).(*http.Response), args.Error(1)
|
||
|
}
|