X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Ftests%2Fpatchparser.py;fp=apps%2Fpatchwork%2Ftests%2Fpatchparser.py;h=5662389f09e64169d7a2d14809545e4c62f3ee50;hb=3dbec78dbd8e80729cf208d1e68f550b7d7ba5a9;hp=523b9c0d5cf62e25ddd8c9ee8cfbac983ed3e9d9;hpb=9d22330effa8d433ec39edc37ca4e3a1e3206b85;p=patchwork diff --git a/apps/patchwork/tests/patchparser.py b/apps/patchwork/tests/patchparser.py index 523b9c0..5662389 100644 --- a/apps/patchwork/tests/patchparser.py +++ b/apps/patchwork/tests/patchparser.py @@ -392,6 +392,27 @@ class GitPullSSHUrlTest(GitPullTest): class GitPullHTTPUrlTest(GitPullTest): mail_file = '0006-git-pull-request-http.mbox' +class GitRenameOnlyTest(MBoxPatchTest): + mail_file = '0008-git-rename.mbox' + + def testGitRename(self): + (patch, comment) = find_content(self.project, self.mail) + self.assertTrue(patch is not None) + self.assertTrue(comment is not None) + self.assertEqual(patch.content.count("\nrename from "), 2) + self.assertEqual(patch.content.count("\nrename to "), 2) + +class GitRenameWithDiffTest(MBoxPatchTest): + mail_file = '0009-git-rename-with-diff.mbox' + + def testGitRename(self): + (patch, comment) = find_content(self.project, self.mail) + self.assertTrue(patch is not None) + self.assertTrue(comment is not None) + self.assertEqual(patch.content.count("\nrename from "), 2) + self.assertEqual(patch.content.count("\nrename to "), 2) + self.assertEqual(patch.content.count('\n-a\n+b'), 1) + class CVSFormatPatchTest(MBoxPatchTest): mail_file = '0007-cvs-format-diff.mbox'