~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-30 16:06:19 UTC
  • mfrom: (5971.1.80 bzr-gpgme)
  • Revision ID: pqm@pqm.ubuntu.com-20110630160619-3022zmfchft893nt
(jr) A new command ``bzr verify-signatures`` has been added to check that
 commits
 are correctly signed with trusted keys by GPG. This requires python-gpgme to
 be installed. ``bzr log`` has gained a ``--signatures`` option to list the
 validity of signatures for each commit. New config options
 ``acceptable_keys``
 and ``validate_signatures_in_log`` can be set to control options to these
 commands. (Jonathan Riddell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
change_editor=vimdiff -of @new_path @old_path
162
162
gpg_signing_command=gnome-gpg
163
163
log_format=short
 
164
validate_signatures_in_log=true
 
165
acceptable_keys=amy
164
166
user_global_option=something
165
167
bzr.mergetool.sometool=sometool {base} {this} {other} -o {result}
166
168
bzr.mergetool.funkytool=funkytool "arg with spaces" {this_temp}
513
515
        my_config = config.Config()
514
516
        self.assertEqual('long', my_config.log_format())
515
517
 
 
518
    def test_acceptable_keys_default(self):
 
519
        my_config = config.Config()
 
520
        self.assertEqual(None, my_config.acceptable_keys())
 
521
 
 
522
    def test_validate_signatures_in_log_default(self):
 
523
        my_config = config.Config()
 
524
        self.assertEqual(False, my_config.validate_signatures_in_log())
 
525
 
516
526
    def test_get_change_editor(self):
517
527
        my_config = InstrumentedConfig()
518
528
        change_editor = my_config.get_change_editor('old_tree', 'new_tree')
1240
1250
        my_config = self._get_sample_config()
1241
1251
        self.assertEqual("short", my_config.log_format())
1242
1252
 
 
1253
    def test_configured_acceptable_keys(self):
 
1254
        my_config = self._get_sample_config()
 
1255
        self.assertEqual("amy", my_config.acceptable_keys())
 
1256
 
 
1257
    def test_configured_validate_signatures_in_log(self):
 
1258
        my_config = self._get_sample_config()
 
1259
        self.assertEqual(True, my_config.validate_signatures_in_log())
 
1260
 
1243
1261
    def test_get_alias(self):
1244
1262
        my_config = self._get_sample_config()
1245
1263
        self.assertEqual('help', my_config.get_alias('h'))