]> git.ipfire.org Git - thirdparty/patchwork.git/commit
py3: Resolve unicode issues
authorStephen Finucane <stephen.finucane@intel.com>
Sun, 29 Nov 2015 06:53:05 +0000 (06:53 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 3 Dec 2015 22:08:57 +0000 (22:08 +0000)
commite8a50c8c302875a83ee6c3e6d23ab9ee3fdf0596
tree757afa28e300ed8ff2a940f3a544aa73563711cb
parent4db36325602951f7b34f93ba0d1920dda4f72d9c
py3: Resolve unicode issues

Python 3 is unicode only. While many of the issues with unicode, such
as the now invalid 'u' prefix, have already been resolved, there are a
few more issues.

Many of these issues are related to HTTPResponse.content, which returns
bytes and needs to be "decoded" in order to perform actions like
concatenation with str objects (unicode). Where possible, make use of
assertContains, per the Django documentation (http://bit.ly/1lRDYie),
else fall back to including a 'decode' statement.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
patchwork/bin/parsemail.py
patchwork/parser.py
patchwork/tests/test_bundles.py
patchwork/tests/test_filters.py
patchwork/tests/test_list.py
patchwork/tests/test_mail_settings.py
patchwork/tests/test_mboxviews.py
patchwork/tests/test_person.py
patchwork/views/patch.py