| 752 | } |
| 753 | |
| 754 | func (rt *RestTester) SendAdminRequestWithAuth(method, resource string, body string, username string, password string) *TestResponse { |
| 755 | request := Request(method, rt.mustTemplateResource(resource), body) |
| 756 | |
| 757 | request.SetBasicAuth(username, password) |
| 758 | |
| 759 | response := &TestResponse{ResponseRecorder: httptest.NewRecorder(), Req: request} |
| 760 | |
| 761 | rt.TestAdminHandler().ServeHTTP(response, request) |
| 762 | return response |
| 763 | } |
| 764 | |
| 765 | func (rt *RestTester) Send(request *http.Request) *TestResponse { |
| 766 | response := &TestResponse{ResponseRecorder: httptest.NewRecorder(), Req: request} |