My feeling is that this logic does not belong in the task.  "How katello should respond to various input" is the job of testcases.  

As written, this task is encoding how katello should respond to a name > 255 chars.  That isn't its job, IMO.  A task's job is to simply do what the caller tells it and report what happened.

The `(expecting-error ...)` should be in the testcase.  I think testcases should define what behavior is expected.