aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/13_test_gbp_pq.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-11-23 18:52:06 +0100
committerGuido Günther <agx@sigxcpu.org>2012-11-23 19:24:12 +0100
commit7f2c9c18c1d4bead6d012ee78088adbdd88fca02 (patch)
tree41fd6077a3e9ba1c7ca9295cda52f6ce3bca2794 /tests/13_test_gbp_pq.py
parent395209152ef4ef4e0b17b239462bc470513b5540 (diff)
Test if setting a topic works
Diffstat (limited to 'tests/13_test_gbp_pq.py')
-rw-r--r--tests/13_test_gbp_pq.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/13_test_gbp_pq.py b/tests/13_test_gbp_pq.py
index f6a13ab3..b4161308 100644
--- a/tests/13_test_gbp_pq.py
+++ b/tests/13_test_gbp_pq.py
@@ -26,6 +26,16 @@ class TestApplyAndCommit(testutils.DebianGitTestRepo):
self.assertIn('foo', self.repo.list_files())
+ def test_topic(self):
+ """Test if setting a topic works"""
+ patch = gbp.patch_series.Patch(
+ os.path.join(os.path.abspath(os.path.curdir),
+ 'tests/data/foo.patch'))
+
+ gbp.scripts.common.pq.apply_and_commit_patch(self.repo, patch, None,
+ topic='foobar')
+ info = self.repo.get_commit_info('HEAD')
+ self.assertIn('Gbp-Pq-Topic: foobar', info['body'])
@unittest.skipIf(not os.path.exists('/usr/bin/dpkg'), 'Dpkg not found')
def test_debian_missing_author(self):