unit testing a routine that sends mail

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Thu Feb 18 16:27:16 CET 2010

commander_coder a écrit :
> Hello,
> I have a routine that sends an email (this is how a Django view
> notifies me that an event has happened).  I want to unit test that
> routine.  


Or if you're stuck with 1.x < 1.2a, you could just mock the send_mail 
function to test that your app does send the appropriate mail - which is 
what you really want to know.

My 2 cents...

More information about the Python-list mailing list