diff options
author | Guido Günther <agx@sigxcpu.org> | 2013-08-21 21:10:15 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-08-21 21:11:15 +0200 |
commit | 7a29e4286ceccf8b4c6f132d781a4041e333fc4e (patch) | |
tree | 0989de842fa877af05f73db855482703de1d4343 /tests/testutils.py | |
parent | 60ffe95dbaaf7b0e741ce74657d3de5563cb1683 (diff) | |
download | git-buildpackage-7a29e4286ceccf8b4c6f132d781a4041e333fc4e.tar.gz git-buildpackage-7a29e4286ceccf8b4c6f132d781a4041e333fc4e.tar.bz2 git-buildpackage-7a29e4286ceccf8b4c6f132d781a4041e333fc4e.zip |
Move MockedChangelog to testutils
and allow to specify the content so we can reuse it for other dch
tests.
Diffstat (limited to 'tests/testutils.py')
-rw-r--r-- | tests/testutils.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/testutils.py b/tests/testutils.py index 0f953bce..617a7abc 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -8,6 +8,7 @@ import unittest import gbp.log import gbp.deb.git import gbp.errors +from gbp.deb.changelog import ChangeLog class DebianGitTestRepo(unittest.TestCase): """Scratch repo for a single unit test""" @@ -74,3 +75,15 @@ class OsReleaseFile(object): def __repr__(self): return repr(self._values) + +class MockedChangeLog(ChangeLog): + contents = """foo (%s) experimental; urgency=low + + %s + + -- Debian Maintainer <maint@debian.org> Sat, 01 Jan 2012 00:00:00 +0100""" + + def __init__(self, version, changes = "a important change"): + ChangeLog.__init__(self, + contents=self.contents % (version, changes)) + |