[MERGE] improve SMTPConnection connection setup
John Arbash Meinel
john at arbash-meinel.com
Fri Oct 19 21:44:55 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
James Henstridge wrote:
> On 10/10/2007, John Arbash Meinel <john at arbash-meinel.com> wrote:
>> John Arbash Meinel has voted tweak.
>> Status is now: Semi-approved
>> Comment:
>> I think this is actually a Stub versus a Mock (since you aren't giving
>> it the expected call + responses, it is just logging what call is made).
>> But my TDD lingo isn't fully up to par.
>>
>> Otherwise it looks like a great fix, and I would like to see it merged.
>
> Attached is an updated bundle that fixes the naming issue mentioned by John.
>
> James.
>
BB:resubmit
It turns out that this patch breaks some tests.
Specifically it is breaking:
bzrlib.tests.blackbox.test_merge_directive.TestMergeDirective.test_mail_default
Something about:
...
File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/smtp_connection.py", line
83, in _create_connection
code, resp = self._connection.ehlo()
File "/usr/lib/python2.4/smtplib.py", line 397, in ehlo
self.putcmd("ehlo", name or self.local_hostname)
File "/usr/lib/python2.4/smtplib.py", line 333, in putcmd
self.send(str)
File "/usr/lib/python2.4/smtplib.py", line 318, in send
if self.sock:
AttributeError: SMTP instance has no attribute 'sock'
I'm guessing this is just because the merge-directive stub is not fully
conformant and needs to be updated slightly. Would it be possible to use the
new Stub instead? (Since it seems to be rather full featured, though it may be
focused on connection errors.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHGRdGJdeBCYSNAAMRAhBTAKCJNe8hhLTm2ibark7A5Rzxp6v+KwCfV7VB
TInxOIZlyrPTdOOuxujvMmc=
=ybQa
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list