def METHOD_NAME(self, error):
    with mock.patch.object(errors, "_dump_errors", side_effect=KeyError):
        string = str(error)
    assert string == inspect.cleandoc(
        """
        Bad Request 400: 'raw body' for https://some.url
        {
          "": [
            {
              "code": "012",
              "message": "test error"
            }
          ],
          "components": {
            "0": {
              "_errors": [
                {
                  "code": "123",
                  "message": "something went wrong"
                },
                {
                  "code": "456",
                  "message": "but more things too!"
                }
              ]
            }
          },
          "attachments": {
            "1": {
              "_errors": [
                {
                  "code": "789",
                  "message": "at this point, all wrong!"
                }
              ]
            }
          }
        }
        """
    )