[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/SmtpService/Views - __init__.py:1.1 configure.zcml:1.1

Jim Fulton jim@zope.com
Sun, 27 Oct 2002 10:21:01 -0500


Steve Alexander wrote:
> Florent Guillaume wrote:
> 
>> Speaking of SMTP, I'm not too happy about the implementation just
>> checked in. It's not very clean, there are no docstrings, it won't
>> support Unicode strings and encode them as needed, it doesn't use string
>> methods as Kapil noticed, it doesn't use isinstance, the interface is
>> ISMTPService whereas the module is SmtpService, there are no unit tests,
>> even $Id: doesn't have a closing $...
>>
>> Ok, ok, I'm whining and not writing that code, but still it had to be
>> said.
> 
> 
> The main problem is that there are no unit tests.

I told Merthy that he could skip unit tests, at least for the content
class because, frankly, I couldn't think of how he would write them,
The class does pretty much nothing but send mail. You don't want to
send mail in a unit test.  The only way I could see to do this would
be to actually write an SMTP server that the class could connect to.
I suppose that this would be possible, but it would, obviously, be a
significant effort.

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org