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") }
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") }