OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / stretchr / testify / http / test_round_tripper.go
1 package http
2
3 import (
4         "github.com/stretchr/testify/mock"
5         "net/http"
6 )
7
8 // TestRoundTripper DEPRECATED USE net/http/httptest
9 type TestRoundTripper struct {
10         mock.Mock
11 }
12
13 // RoundTrip DEPRECATED USE net/http/httptest
14 func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
15         args := t.Called(req)
16         return args.Get(0).(*http.Response), args.Error(1)
17 }