/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 bzrlib/tests/test_mail_client.py

  • Committer: Martin Pool
  • Date: 2009-06-05 23:15:23 UTC
  • mto: This revision was merged to the branch mainline in revision 4565.
  • Revision ID: mbp@sourcefrog.net-20090605231523-fzaebdzckp38hoir
Remove one use of DummyProgress

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
    def test_commandline(self):
30
30
        mutt = mail_client.Mutt(None)
31
 
        commandline = mutt._get_compose_commandline(
32
 
            None, None, 'file%', body="hello")
33
 
        # The temporary filename is randomly generated, so it is not matched.
34
 
        self.assertEqual(['-a', 'file%', '-i'], commandline[:-1])
 
31
        commandline = mutt._get_compose_commandline(None, None, 'file%')
 
32
        self.assertEqual(['-a', 'file%'], commandline)
35
33
        commandline = mutt._get_compose_commandline('jrandom@example.org',
36
34
                                                     'Hi there!', None)
37
35
        self.assertEqual(['-s', 'Hi there!', '--', 'jrandom@example.org'],
97
95
        # We won't be able to know the temporary file name at this stage
98
96
        # so we can't raise an assertion with assertEqual
99
97
        cmdline = eclient._get_compose_commandline(None, None, 'file%')
100
 
        if eclient.elisp_tmp_file is not None:
101
 
            self.addCleanup(osutils.delete_any, eclient.elisp_tmp_file)
102
98
        commandline = ' '.join(cmdline)
103
99
        self.assertContainsRe(commandline, '--eval')
104
100
        self.assertContainsRe(commandline, '(compose-mail nil nil)')
109
105
        eclient = mail_client.EmacsMail(None)
110
106
        commandline = eclient._get_compose_commandline(u'jrandom@example.org',
111
107
            u'Hi there!', u'file%')
112
 
        if eclient.elisp_tmp_file is not None:
113
 
            self.addCleanup(osutils.delete_any, eclient.elisp_tmp_file)
114
108
        for item in commandline:
115
109
            self.assertFalse(isinstance(item, unicode),
116
110
                'Command-line item %r is unicode!' % item)