188
188
def test_commandline(self):
189
189
claws = mail_client.Claws(None)
190
commandline = claws._get_compose_commandline(None, None, 'file%')
191
self.assertEqual(['--compose', '?attach=file%25'], commandline)
192
commandline = claws._get_compose_commandline(
193
'jrandom@example.org', 'Hi there!', None)
195
['--compose', 'jrandom@example.org?subject=Hi%20there%21'],
198
def test_commandline_with_config(self):
199
claws = mail_client.Claws(InstrumentedConfig())
200
commandline = claws._get_compose_commandline(None, None, 'file%')
202
['--compose', ('?attach=file%25&from=Robert%20Collins%20'
203
'%3Crobert.collins%40example.org%3E')],
205
commandline = claws._get_compose_commandline(
206
'jrandom@example.org', 'Hi there!', None)
208
['--compose', ('jrandom@example.org?subject=Hi%20there%21'
209
'&from=Robert%20Collins%20'
210
'%3Crobert.collins%40example.org%3E')],
190
commandline = claws._get_compose_commandline(
193
['--compose', 'mailto:?', '--attach', 'file%'], commandline)
194
commandline = claws._get_compose_commandline(
195
'jrandom@example.org', 'Hi there!', None)
198
'mailto:jrandom@example.org?subject=Hi%20there%21'],
213
201
def test_commandline_is_8bit(self):
216
204
u'jrandom@example.org', u'Hi there!', u'file%')
217
205
self.assertEqual(
219
'jrandom@example.org?subject=Hi%20there%21&attach=file%25'],
207
'mailto:jrandom@example.org?subject=Hi%20there%21',
221
211
for item in cmdline:
222
212
self.assertFalse(isinstance(item, unicode),