X-Git-Url: https://git.ozlabs.org/?p=patchwork;a=blobdiff_plain;f=apps%2Fpatchwork%2Ftests%2Fpatchparser.py;fp=apps%2Fpatchwork%2Ftests%2Fpatchparser.py;h=7013e851f835bf0130be661c06e908962b33d331;hp=953b94cfca8f23701541d8f46a85de29bd99e4a0;hb=479a6a88c41203aca1a1f44253554a4f28d2e248;hpb=f7a3c5dff0da19e6bd737c51187a1f5aa7373c67 diff --git a/apps/patchwork/tests/patchparser.py b/apps/patchwork/tests/patchparser.py index 953b94c..7013e85 100644 --- a/apps/patchwork/tests/patchparser.py +++ b/apps/patchwork/tests/patchparser.py @@ -360,3 +360,16 @@ class GitPullTest(PatchTest): class GitPullWrappedTest(GitPullTest): mail_file = '0002-git-pull-request-wrapped.mbox' + +class GitPullWithDiffTest(PatchTest): + def testGitPullWithDiff(self): + mail = read_mail('0003-git-pull-request-with-diff.mbox', + project = self.project) + (patch, comment) = find_content(self.project, mail) + self.assertTrue(patch is not None) + self.assertEqual('git://git.kernel.org/pub/scm/linux/kernel/git/tip/' + + 'linux-2.6-tip.git x86-fixes-for-linus', patch.pull_url) + self.assertTrue( + patch.content.startswith('diff --git a/arch/x86/include/asm/smp.h'), + patch.content) + self.assertTrue(comment is not None)