'bzr send' fails when using the DefaultMail client

John Arbash Meinel john at arbash-meinel.com
Mon Mar 17 20:47:43 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Westby wrote:
> On Mon, 2008-03-17 at 15:33 -0500, John Arbash Meinel wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Specifically, DefaultMail has:
>>     def compose_merge_request(self, to, subject, directive):
>>
>> But it seems to be expecting the base class implementation:
>>     def compose_merge_request(self, to, subject, directive, basename=None):
>>
>> Anyway, it means "bzr send" is broken in default. I normally don't use
>> it (I always use -o ... because I never bothered to set it up with
>> Thunderbird).
>>
>> Anyway, the attached patch "fixes" it, but it doesn't add a test, which
>> we really should have.
> 
> Hi John,
> 
> I've already got a merge request up for this patch, sorry that you
> missed it.
> 
> Unfortunately I didn't add a test either. Do you know what one
> should look like?
> 
> Thanks,
> 
> James

Well, I was just trying "bzr send" again and then I had it blow up... It
only took about 5 min for me to put together a patch.

I would certainly expect the test case to go into "test_mail_client.py".

I don't see any "implementations" tests for MailClient implementations,
which is sort of how it should be done. The problem is that you don't
actually want to send emails while you are testing it, which means that
you can't really test that sending through Thunderbird works.

So what I would add is a "class TestDefaultClient" TestCase and then add
a couple simple tests on it. Mostly just smoke tests for the api.

Also, if you want some hints as to how to not actually send email, you
might look at the email tests. Or bzr-email/bzr-pqm-submit both have a
bit of hacks to prevent mails from actually being sent.

John
=:->


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH3tjvJdeBCYSNAAMRAldwAKC/sDB/Ov0BXjDHMuEtv0MfsMA9lACeJCFg
ApfzwaFIpkT1FKI/88ACf+Q=
=z5dh
-----END PGP SIGNATURE-----



More information about the bazaar mailing list