~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2007-08-09 21:23:15 UTC
  • mto: (2681.5.3 bzr-mail)
  • mto: This revision was merged to the branch mainline in revision 2736.
  • Revision ID: abentley@panoramicfeedback.com-20070809212315-ozfu5n3b7k3afntl
Add support for submit_to config option

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
from StringIO import StringIO
21
21
 
22
 
from bzrlib import merge_directive
 
22
from bzrlib import (
 
23
    branch as _mod_branch,
 
24
    merge_directive,
 
25
    )
23
26
from bzrlib.bundle import serializer
24
27
from bzrlib.bzrdir import BzrDir
25
28
from bzrlib import tests
186
189
        stdout = self.run_bzr('send -f branch --output -')[0]
187
190
        self.assertContainsRe(stdout, 'revision3')
188
191
 
189
 
    def test_mailto_option_required(self):
 
192
    def test_mailto_option(self):
190
193
        self.make_trees()
 
194
        branch = _mod_branch.Branch.open('branch')
 
195
        branch.get_config().set_user_option('mail_client', 'bogus')
191
196
        self.run_bzr_error(('No mail-to address specified',), 'send -f branch')
192
197
        self.run_bzr('send -f branch -o-')
 
198
        self.run_bzr_error(('Unknown mail client: bogus',),
 
199
                           'send -f branch --mail-to jrandom@example.org')
 
200
        branch.get_config().set_user_option('submit_to', 'jrandom@example.org')
 
201
        self.run_bzr_error(('Unknown mail client: bogus',),
 
202
                           'send -f branch')
193
203
 
194
204
    def test_format(self):
195
205
        self.make_trees()