X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Ftests%2Fpatchparser.py;h=2e207bf7e9ec781a1ebb88f3b2b99146e86d503f;hb=5787cddc0bde4514cba96a360f89841e13d2e506;hp=3b10ef5166808ae7006224fbfb0330e59d06c201;hpb=26c532d2cfeec0bd4339b5c1db4bb2b3d4a3d3f0;p=patchwork diff --git a/apps/patchwork/tests/patchparser.py b/apps/patchwork/tests/patchparser.py index 3b10ef5..2e207bf 100644 --- a/apps/patchwork/tests/patchparser.py +++ b/apps/patchwork/tests/patchparser.py @@ -102,3 +102,27 @@ class SignatureCommentTest(InlinePatchTest): '-- \nsig\n' + self.orig_patch) (self.patch, self.comment) = find_content(self.project, email) + +class ListFooterTest(InlinePatchTest): + patch_filename = '0001-add-line.patch' + test_comment = 'Test comment\nmore comment' + + def setUp(self): + self.orig_patch = self.read_patch(self.patch_filename) + email = self.create_email( \ + self.test_comment + '\n' + \ + '_______________________________________________\n' + \ + 'Linuxppc-dev mailing list\n' + \ + self.orig_patch) + (self.patch, self.comment) = find_content(self.project, email) + + +class UpdateCommentTest(InlinePatchTest): + """ Test for '---\nUpdate: v2' style comments to patches. """ + patch_filename = '0001-add-line.patch' + test_comment = 'Test comment\nmore comment\n---\nUpdate: test update' + +class UpdateSigCommentTest(SignatureCommentTest): + """ Test for '---\nUpdate: v2' style comments to patches, with a sig """ + patch_filename = '0001-add-line.patch' + test_comment = 'Test comment\nmore comment\n---\nUpdate: test update'