~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 21:57:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1462.
  • Revision ID: robertc@robertcollins.net-20051017215732-08f487800e726748
Allow creation of testaments from uncommitted data, and use that to get signatures before committing revisions.

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')