Exemplo n.º 1
0
func (s *ErrorsSuite) TestCreateRequestTooLargeError(c *gc.C) {
	context := "context"
	err := errors.NewRequestTooLargef(nil, context, "It was request too large: %s", context)
	c.Assert(errors.IsRequestTooLarge(err), gc.Equals, true)
	c.Assert(err.Error(), gc.Equals, "It was request too large: context")
}
Exemplo n.º 2
0
func (s *ErrorsSuite) TestCreateSimpleRequestTooLargeError(c *gc.C) {
	context := "context"
	err := errors.NewRequestTooLargef(nil, context, "")
	c.Assert(errors.IsRequestTooLarge(err), gc.Equals, true)
	c.Assert(err.Error(), gc.Equals, "Request Too Large: context")
}