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

Guido van Rossum guido@python.org
Mon, 28 Oct 2002 07:45:08 -0500


> > Does it just use smtplib to send the mail?  Perhaps the right approach
> > would be to replace smtplib with a stub that records the calls into
> > the library so the result can be checked for sanity.  The replacement
> > could be inserted during the setup and replaced in the teardown.
> 
> Right. This would require hacking sys.modules.

Or changing the API slightly so that the SMTP class can be passed in
rather than always importing it from smtplib.

--Guido van Rossum (home page: http://www.python.org/~guido/)