~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_gpg.py

  • Committer: Vincent Ladeuil
  • Date: 2011-12-21 14:25:26 UTC
  • mto: This revision was merged to the branch mainline in revision 6397.
  • Revision ID: v.ladeuil+lp@free.fr-20111221142526-pnwau0xnalimujts
Provides MemoryStack to simplify configuration setup in tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    )
35
35
 
36
36
 
37
 
class FakeConfig(config.Stack):
 
37
class FakeConfig(config.MemoryStack):
38
38
 
39
39
    def __init__(self, content=None):
40
 
        store = config.IniFileStore()
41
40
        if content is None:
42
41
            content = '''
43
42
gpg_signing_key=amy@example.com
44
43
gpg_signing_command=false'''
45
 
        store._load_from_string(content)
46
 
        super(FakeConfig, self).__init__([store.get_sections])
 
44
        super(FakeConfig, self).__init__(content)
47
45
 
48
46
 
49
47
class TestCommandLine(tests.TestCase):
118
116
        self.assertRaises(errors.BzrBadParameterUnicode,
119
117
                          self.assertProduces, u'foo')
120
118
 
 
119
 
121
120
class TestVerify(TestCase):
122
121
 
123
122
    def import_keys(self):