diff options
author | Guido Günther <agx@sigxcpu.org> | 2013-04-30 16:49:34 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-04-30 16:49:34 +0200 |
commit | e97d1286b7865ccb81737038571596ad3024af85 (patch) | |
tree | 84ed3bb2bf32b229be42c35b019366e47339165b /tests/13_test_gbp_pq.py | |
parent | f270a1803613d256e22ff220374776bcb557423a (diff) |
Silence test_debian_missing_author
and better use the output for verification
Diffstat (limited to 'tests/13_test_gbp_pq.py')
-rw-r--r-- | tests/13_test_gbp_pq.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/13_test_gbp_pq.py b/tests/13_test_gbp_pq.py index 10d5a77..cebea25 100644 --- a/tests/13_test_gbp_pq.py +++ b/tests/13_test_gbp_pq.py @@ -52,8 +52,11 @@ class TestApplyAndCommit(testutils.DebianGitTestRepo): def test_debian_missing_author(self): """ Check if we parse the author from debian control - if it's missing. + if it's missing in the patch. """ + def _check_log(msg): + self.assertEqual(msg, "Patch 'foo.patch' has no authorship " + "information, using 'Guido Günther <gg@godiug.net>'") patch = gbp.patch_series.Patch(_patch_path('foo.patch')) @@ -67,7 +70,10 @@ class TestApplyAndCommit(testutils.DebianGitTestRepo): "Maintainer: Guido Günther <gg@godiug.net>") maintainer = pq.get_maintainer_from_control(self.repo) + orig_warn = gbp.log.warn + gbp.log.warn = _check_log pq.apply_and_commit_patch(self.repo, patch, maintainer) + gbp.log.warn = orig_warn info = self.repo.get_commit_info('HEAD') self.assertEqual(info['author'].email, 'gg@godiug.net') self.assertIn('foo', self.repo.list_files()) |