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')
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"',),
216
217
def test_format(self):
217
218
md = self.get_MD(['--format=4'])