/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_mail_client.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-03-25 11:54:30 UTC
  • mfrom: (6855.4.10 more-bees)
  • Revision ID: breezy.the.bot@gmail.com-20180325115430-75xnlbrmzjoomd83
Add more bees. In particular:

* for file ids
* for revision ids
* for file contents in build_tree_contents()

Merged from https://code.launchpad.net/~jelmer/brz/more-bees/+merge/337919

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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
import urllib
18
 
 
19
 
from bzrlib import (
 
17
from .. import (
20
18
    errors,
21
19
    mail_client,
22
20
    tests,
120
118
 
121
119
    def test_commandline(self):
122
120
        xdg_email = mail_client.XDGEmail(None)
123
 
        self.assertRaises(errors.NoMailAddressSpecified,
 
121
        self.assertRaises(mail_client.NoMailAddressSpecified,
124
122
                          xdg_email._get_compose_commandline,
125
123
                          None, None, 'file%')
126
124
        commandline = xdg_email._get_compose_commandline(
212
210
        claws = mail_client.Claws(None)
213
211
        cmdline = claws._get_compose_commandline(
214
212
            u'jrandom@example.org', u'\xb5cosm of fun!', u'file%')
215
 
        subject_string = urllib.quote(
 
213
        subject_string = urlutils.quote(
216
214
            u'\xb5cosm of fun!'.encode(osutils.get_user_encoding(), 'replace'))
217
215
        self.assertEqual(
218
216
            ['--compose',
235
233
 
236
234
    def test_to_required(self):
237
235
        claws = mail_client.Claws(None)
238
 
        self.assertRaises(errors.NoMailAddressSpecified,
 
236
        self.assertRaises(mail_client.NoMailAddressSpecified,
239
237
                          claws._get_compose_commandline,
240
238
                          None, None, 'file%')
241
239