Exemple #1
0
// Test if performing a request invokes the SNSs configured
// http.Client
func (s *ClientSuite) TestClientUsed(c *C) {
	transport := &FlaggingRoundTripper{false, http.DefaultTransport}
	instance := sns.SNSWithClient(s.auth, s.region, &http.Client{Transport: transport})
	testServer.Response(200, nil, TestListTopicsXmlOK)
	instance.ListTopics(nil)
	testServer.WaitRequest()
	c.Assert(transport.Transported, Equals, true)
}
Exemple #2
0
// Test if SNSWithClient returns an SNS
func (s *ClientSuite) TestWithClient(c *C) {
	instance := sns.SNSWithClient(s.auth, s.region, &http.Client{})
	c.Assert(instance, NotNil)
}