~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:41:07 UTC
  • mfrom: (1442.1.60)
  • Revision ID: robertc@robertcollins.net-20051017114107-f5586285d825c105
Merge in first part of GPG support.

This adds check_signatures config support, triams back the transport api
to be leaner and easier to hook in suffixes - non primary streams in the store
associated with the fileid that primary data is stored in, a gpg module which
will encapsulate all signing and checking operations.

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