X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Ftests%2Fpatchparser.py;h=7b24bbcd62c43ce96ad7bbd6d75b46c8d6aabb6e;hb=78fd29fd514dbe75bb2ebbdea1ad03da14e426ed;hp=649da0a2f684f5ed3face1da5ffd968702afc76b;hpb=f2ad003c12123f91c0d1d3cb21d4c2a3bfdfbadd;p=patchwork diff --git a/apps/patchwork/tests/patchparser.py b/apps/patchwork/tests/patchparser.py index 649da0a..7b24bbc 100644 --- a/apps/patchwork/tests/patchparser.py +++ b/apps/patchwork/tests/patchparser.py @@ -69,6 +69,15 @@ class AttachmentPatchTest(InlinePatchTest): email.attach(attachment) (self.patch, self.comment) = find_content(self.project, email) +class UTF8InlinePatchTest(InlinePatchTest): + patch_filename = '0002-utf-8.patch' + patch_encoding = 'utf-8' + + def setUp(self): + self.orig_patch = read_patch(self.patch_filename, self.patch_encoding) + email = create_email(self.test_comment + '\n' + self.orig_patch, + content_encoding = self.patch_encoding) + (self.patch, self.comment) = find_content(self.project, email) class SignatureCommentTest(InlinePatchTest): patch_filename = '0001-add-line.patch'