Support `.encode()` keyword arguments for Python 2.6.
Use a generator expression instead to support Python 2.6.
Don't assume it's a named tuple to support Python 2.6.
Switch to `unittest2` to be able to use new features in Python 2.6.
Python 2.6 is now supported.