[Checkins] Re: SVN: zope.sendmail/trunk/src/zope/sendmail/ merging

Andreas Jung lists at zopyx.com
Mon Aug 20 08:26:47 EDT 2007



--On 20. August 2007 17:40:00 +0530 Baiju M <mbaiju at zeomega.com> wrote:

> Andreas Jung wrote:
>>
>>
>> --On 20. August 2007 09:37:21 +0200 Philipp von Weitershausen
>> <philipp at weitershausen.de> wrote:
>>
>>> Baiju M wrote:
>>>> Andreas Jung wrote:
>>>>> Log message for revision 79001:
>>>>>   merging
>>>>>
>>>>> svn+ssh://svn.zope.org/repos/main/zope.sendmail/branches/ajung-encryp
>>>>> ti
>>>>>
>>>>> on-branch
>>>>>
>>>>>     This branch provides TLS/SSL encryption support.
>>>> There are two errors from zope.sendmail, like:
>>>> Error in test test_send
>>>> (zope.sendmail.tests.test_mailer.TestSMTPMailer)
>>>> Traceback (most recent call last):
>>>>  File "/baiju/usr//lib/python2.4/unittest.py", line 260, in run
>>>>    testMethod()
>>>>  File
>>>> "/home/baiju/wa/zope.sendmail/src/zope/sendmail/tests/test_mailer.py",
>>>> line 68, in test_send
>>>>    self.mailer.send(fromaddr, toaddrs, msgtext)
>>>>  File "/home/baiju/wa/zope.sendmail/src/zope/sendmail/mailer.py", line
>>>> 49, in send
>>>>    code, response = connection.ehlo()
>>>> AttributeError: 'SMTP' object has no attribute 'ehlo'
>>>>
>>>> Please modify SMTP mock object to run the test.  I just tried to do
>>>> this and it's working, please verify it:
>>>> ...
>>>
>>> Also, this features lacks tests of its own. Andreas, could you please
>>> fix
>>> the existing tests and provide tests for the new feature?
>>>
>>
>> Fixed. But keep in mind that such mock tests are highly artificial and
>> can never replace real-world tests (in this case against existing SMTP
>> servers).
> How to write automated real-world tests ? Is zc.ngi an option ?
>
> Using the mock test at least we can improve test coverage,  is it?
>
>

Real world tests against the variety of different mailservers is _much_ more
important than test coverage and testing against a non-real-world 
environment. Such artificial tests test the code against "how the world 
should" be but it don't tell you if your code actually works in the real 
world.

Andreas 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/checkins/attachments/20070820/b6388b91/attachment.bin


More information about the Checkins mailing list