X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Ftests%2Ftest_patchparser.py;h=d9a24c1933b866d1397c5b5a8658c4f7b881980a;hb=880fc52d2d4ccdcbf4a7b76f1b4ba6b9e7482dff;hp=0496a69f231e21f5e0dda86c8b247560c5a7a8ea;hpb=f79c54871da0c36daaa559ec4a86f3e926bbe9ff;p=patchwork diff --git a/apps/patchwork/tests/test_patchparser.py b/apps/patchwork/tests/test_patchparser.py index 0496a69..d9a24c1 100644 --- a/apps/patchwork/tests/test_patchparser.py +++ b/apps/patchwork/tests/test_patchparser.py @@ -422,6 +422,17 @@ class CVSFormatPatchTest(MBoxPatchTest): self.assertTrue(comment is not None) self.assertTrue(patch.content.startswith('Index')) +class CharsetFallbackPatchTest(MBoxPatchTest): + """ Test mail with and invalid charset name, and check that we can parse + with one of the fallback encodings""" + + mail_file = '0010-invalid-charset.mbox' + + def testPatch(self): + (patch, comment) = find_content(self.project, self.mail) + self.assertTrue(patch is not None) + self.assertTrue(comment is not None) + class DelegateRequestTest(TestCase): patch_filename = '0001-add-line.patch' msgid = '<1@example.com>'