~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_mail_client.py

  • Committer: Aaron Bentley
  • Date: 2009-01-08 14:22:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3927.
  • Revision ID: aaron@aaronbentley.com-20090108142230-ayxkv9nwxywop4dv
Update test to pass under LANG=C

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
 
17
import urllib
 
18
 
17
19
from bzrlib import (
18
20
    errors,
19
21
    mail_client,
20
22
    tests,
21
23
    urlutils,
 
24
    osutils,
22
25
    )
23
26
 
24
27
class TestMutt(tests.TestCase):
199
202
        claws = mail_client.Claws(None)
200
203
        cmdline = claws._get_compose_commandline(
201
204
            u'jrandom@example.org', u'\xb5cosm of fun!', u'file%')
 
205
        subject_string = urllib.quote(
 
206
            u'\xb5cosm of fun!'.encode(osutils.get_user_encoding(), 'replace'))
202
207
        self.assertEqual(
203
208
            ['--compose',
204
 
             'mailto:jrandom@example.org?subject=%C2%B5cosm%20of%20fun%21',
 
209
             'mailto:jrandom@example.org?subject=%s' % subject_string,
205
210
             '--attach',
206
211
             'file%'],
207
212
            cmdline)