~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_sign_my_commits.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-19 18:33:40 UTC
  • mfrom: (5972.3.25 get-ancestry-is-evil)
  • Revision ID: pqm@pqm.ubuntu.com-20110619183340-ds1rpql77nxrmo4n
(jelmer) Deprecate Repository.get_ancestry(). (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Black-box tests for bzr sign-my-commits."""
19
19
 
20
 
import os
21
 
 
22
20
from bzrlib import (
23
21
    gpg,
24
22
    tests,
25
23
    )
26
 
from bzrlib.testament import Testament
27
 
from bzrlib.workingtree import WorkingTree
28
24
 
29
25
 
30
26
class SignMyCommits(tests.TestCaseWithTransport):
45
41
        wt.commit("base C", allow_pointless=True, rev_id='C')
46
42
        wt.commit("base D", allow_pointless=True, rev_id='D',
47
43
                committer='Alternate <alt@foo.com>')
48
 
 
 
44
        wt.add_parent_tree_id("aghost")
 
45
        wt.commit("base E", allow_pointless=True, rev_id='E')
49
46
        return wt
50
47
 
51
48
    def assertUnsigned(self, repo, revision_id):
109
106
 
110
107
        out = self.run_bzr('sign-my-commits --dry-run')[0]
111
108
 
112
 
        self.assertEquals('A\nB\nC\nSigned 3 revisions\n', out)
 
109
        outlines = out.splitlines()
 
110
        self.assertEquals(5, len(outlines))
 
111
        self.assertEquals('Signed 4 revisions', outlines[-1])
113
112
        self.assertUnsigned(repo, 'A')
114
113
        self.assertUnsigned(repo, 'B')
115
114
        self.assertUnsigned(repo, 'C')
116
115
        self.assertUnsigned(repo, 'D')
 
116
        self.assertUnsigned(repo, 'E')