X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Ftests%2Fpatchparser.py;h=e508dc08a9beffcf376d5f3bb28baa84a76d44ad;hb=406d17e8df324c235172ed673ef65e998ca1f6a4;hp=be569c7b4c4d1b8b0537683b7f5c1397264b244e;hpb=ab0062c77d1fd7d1ed583d3db6528a06bface822;p=patchwork diff --git a/apps/patchwork/tests/patchparser.py b/apps/patchwork/tests/patchparser.py index be569c7..e508dc0 100644 --- a/apps/patchwork/tests/patchparser.py +++ b/apps/patchwork/tests/patchparser.py @@ -61,14 +61,18 @@ class InlinePatchTest(PatchTest): class AttachmentPatchTest(InlinePatchTest): patch_filename = '0001-add-line.patch' test_comment = 'Test for attached patch' + content_subtype = 'x-patch' def setUp(self): self.orig_patch = read_patch(self.patch_filename) email = create_email(self.test_comment, multipart = True) - attachment = MIMEText(self.orig_patch, _subtype = 'x-patch') + attachment = MIMEText(self.orig_patch, _subtype = self.content_subtype) email.attach(attachment) (self.patch, self.comment) = find_content(self.project, email) +class AttachmentXDiffPatchTest(AttachmentPatchTest): + content_subtype = 'x-diff' + class UTF8InlinePatchTest(InlinePatchTest): patch_filename = '0002-utf-8.patch' patch_encoding = 'utf-8'