~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 06:53:10 UTC
  • mto: This revision was merged to the branch mainline in revision 1459.
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051017065310-836e3179c48b4f6f
check that we get the right command line from the default gpg strategy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import os
22
22
import sys
23
23
 
24
 
#import bzrlib specific imports here
 
24
import bzrlib.gpg as gpg
25
25
from bzrlib.selftest import TestCase, TestCaseInTempDir
26
26
 
 
27
class FakeConfig(object):
 
28
 
 
29
    def gpg_signing_command(self):
 
30
        return "gnome-gpg"
 
31
        
27
32
 
28
33
class TestCommandLine(TestCase):
29
 
    pass
 
34
 
 
35
    def test_signing_command_line(self):
 
36
        my_gpg = gpg.GPGStrategy(FakeConfig())
 
37
        self.assertEqual('gnome-gpg --clearsign',
 
38
                         my_gpg._command_line())