Silence tox warnings

Also removed the exception because we don't really need a custom message for
the TypeError.
Add test coverage for custom context_type
Hope that pylint will stop complaining about this