Test util functions - these files aren't shared, so put them in the file where they are used. Revert the previous commit that included them as part of the class; agree with @tswicegood, they don't need a `self` context.
Fix warning in tests - `DeprecationWarning: BaseException.message has been deprecated as of Python 2.6`