~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_send.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-02 12:39:18 UTC
  • mfrom: (6449.5.7 ,branch=pending)
  • Revision ID: pqm@pqm.ubuntu.com-20120202123918-18gyztydwlr8jys6
(jelmer) Use config stacks for 'mail_client' configuration option. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
 
194
194
    def test_mailto_option(self):
195
195
        b = branch.Branch.open('branch')
196
 
        b.get_config().set_user_option('mail_client', 'editor')
 
196
        b.get_config_stack().set('mail_client', 'editor')
197
197
        self.run_bzr_error(
198
198
            ('No mail-to address \\(--mail-to\\) or output \\(-o\\) specified',
199
199
            ), 'send -f branch')
200
 
        b.get_config().set_user_option('mail_client', 'bogus')
 
200
        b.get_config_stack().set('mail_client', 'bogus')
201
201
        self.run_send([])
202
 
        self.run_bzr_error(('Unknown mail client: bogus',),
 
202
        self.run_bzr_error(('Bad value "bogus" for option "mail_client"',),
203
203
                           'send -f branch --mail-to jrandom@example.org')
204
204
        b.get_config_stack().set('submit_to', 'jrandom@example.org')
205
 
        self.run_bzr_error(('Unknown mail client: bogus',),
 
205
        self.run_bzr_error(('Bad value "bogus" for option "mail_client"',),
206
206
                           'send -f branch')
207
207
 
208
208
    def test_mailto_child_option(self):
209
209
        """Make sure that child_submit_to is used."""
210
210
        b = branch.Branch.open('branch')
211
 
        b.get_config().set_user_option('mail_client', 'bogus')
 
211
        b.get_config_stack().set('mail_client', 'bogus')
212
212
        parent = branch.Branch.open('parent')
213
213
        parent.get_config_stack().set('child_submit_to', 'somebody@example.org')
214
 
        self.run_bzr_error(('Unknown mail client: bogus',), 'send -f branch')
 
214
        self.run_bzr_error(('Bad value "bogus" for option "mail_client"',),
 
215
                'send -f branch')
215
216
 
216
217
    def test_format(self):
217
218
        md = self.get_MD(['--format=4'])