[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/SmtpService/Views - __init__.py:1.1 configure.zcml:1.1
Barry A. Warsaw
barry@zope.com
Sun, 27 Oct 2002 21:26:29 -0500
>>>>> "JF" == Jim Fulton <jim@zope.com> writes:
JF> I told Merthy that he could skip unit tests, at least for the
JF> content class because, frankly, I couldn't think of how he
JF> would write them, The class does pretty much nothing but send
JF> mail. You don't want to send mail in a unit test. The only
JF> way I could see to do this would be to actually write an SMTP
JF> server that the class could connect to. I suppose that this
JF> would be possible, but it would, obviously, be a significant
JF> effort.
Not necessarily. I wrote Python's smptd.py module for exactly this
purpose w.r.t. Mailman. It's a little kludgy because it has to work
around asyncore, but it's doable. Take a look at tests/EmailBase.py
in the MM2.1 source tree.
-Barry