~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testgpg.py

  • Committer: Robert Collins
  • Date: 2005-10-17 23:35:18 UTC
  • mfrom: (1442.1.65)
  • Revision ID: robertc@robertcollins.net-20051017233518-6746654be564edde
Merge in more GPG work, and more Branch-api-shrinkage.

* Branch.remove has been moved to WorkingTree, which has also gained
  lock_read, lock_write and unlock methods for convenience. (Robert
  Collins)

* Two decorators, needs_read_lock and needs_write_lock have been added
  to the branch module. Use these to cause a function to run in a
  read or write lock respectively. (Robert Collins)

* Branch.open_containing now returns a tuple (Branch, relative-path),
  which allows direct access to the common case of 'get me this file
  from its branch'. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        my_gpg._command_line = lambda:["cat", "-"]
51
51
        self.assertEqual("some content\nwith newlines\n",
52
52
                         my_gpg.sign("some content\nwith newlines\n"))
 
53
 
 
54
 
 
55
class TestDisabled(TestCase):
 
56
 
 
57
    def test_sign(self):
 
58
        self.assertRaises(errors.SigningFailed,
 
59
                          gpg.DisabledGPGStrategy(None).sign, 'content')