1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright 2013 Canonical Ltd. This software is licensed under the
// GNU Lesser General Public License version 3 (see the file COPYING).
package gwacl
import (
"net/http"
)
// NewTestStorageContext returns a StorageContext object built using
// the given *http.Client object. It's meant to be used in the tests
// of other libraries using gwacl to create a StorageContext that will
// interact with a fake client object.
func NewTestStorageContext(client *http.Client) *StorageContext {
storageContext := &StorageContext{}
storageContext.client = client
return storageContext
}
|