]> git.ozlabs.org Git - patchwork/commitdiff
[test] Add test for signatures in comments
authorJeremy Kerr <jk@ozlabs.org>
Sat, 20 Sep 2008 00:11:38 +0000 (10:11 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Sat, 20 Sep 2008 00:11:38 +0000 (10:11 +1000)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/tests/patchparser.py

index 19b7aea2cc90cff1aaa3a2034ce5f52f9802d216..3b10ef5166808ae7006224fbfb0330e59d06c201 100644 (file)
@@ -89,3 +89,16 @@ class AttachmentPatchTest(InlinePatchTest):
         attachment = MIMEText(self.orig_patch, _subtype = 'x-patch')
         email.attach(attachment)
         (self.patch, self.comment) = find_content(self.project, email)
+
+
+class SignatureCommentTest(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' + \
+                '-- \nsig\n' + self.orig_patch)
+        (self.patch, self.comment) = find_content(self.project, email)
+