~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testbranch.py

  • Committer: Robert Collins
  • Date: 2005-10-17 11:31:05 UTC
  • mto: This revision was merged to the branch mainline in revision 1459.
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051017113105-76c3855778da1baa
gpg sign commits if the policy says we need to

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
        # list should be cleared when we do a commit
142
142
        self.assertEquals(b.pending_merges(), [])
143
143
 
 
144
    def test_sign_existing_revision(self):
 
145
        import bzrlib.gpg
 
146
        branch = Branch.initialize('.')
 
147
        branch.commit("base", allow_pointless=True, rev_id='A')
 
148
        from bzrlib.testament import Testament
 
149
        branch.sign_revision('A', bzrlib.gpg.LoopbackGPGStrategy(None))
 
150
        self.assertEqual(Testament.from_revision(branch, 'A').as_short_text(),
 
151
                         branch.revision_store.get('A', 'sig').read())
 
152
 
144
153
 
145
154
class TestRemote(TestCaseWithWebserver):
146
155