aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-11-06 19:22:03 +0100
committerGuido Günther <agx@sigxcpu.org>2017-11-06 19:27:52 +0100
commit1590ec85030f6ed71b4a69bf22b0e9944ca06a7a (patch)
treed3a6909f6b9a6d22ded31c61d5f4f30119a9b1d5 /tests
parent031910888f8d1d407a7c4b8e838cf596c336327b (diff)
pq: Make sure apply_and_commit_patch encodes the author utf-8
Git itself doesn't care but Python wants a bytestring. This only matters when using the C locale. We delay conversion so we don't have to handle fallback_author separately. We can't convert unconditionally since pq-rpm is allowed to pass in a None author.
Diffstat (limited to 'tests')
-rw-r--r--tests/13_test_gbp_pq.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/13_test_gbp_pq.py b/tests/13_test_gbp_pq.py
index 2e9f8a60..5f4668b6 100644
--- a/tests/13_test_gbp_pq.py
+++ b/tests/13_test_gbp_pq.py
@@ -95,7 +95,8 @@ class TestApplyAndCommit(testutils.DebianGitTestRepo):
# Fake a control file
self.add_file("debian/control",
- "Maintainer: Guido Günther <gg@godiug.net>")
+ "Maintainer: Guido Günther <gg@godiug.net>".encode('utf-8'),
+ mode='wb+')
maintainer = pq.get_maintainer_from_control(self.repo)
orig_warn = gbp.log.warn