# HG changeset patch # User Sylvain Thénault # Date 1286470920 -7200 # Node ID 7674f674de40d930fa19b507f0efaf451400d005 # Parent 595e6807dda5b16b07e060f62bd1554818ab3f76 [testlib] fix mail monkey patching, former patch was applied on stable instead of default diff -r 595e6807dda5 -r 7674f674de40 devtools/testlib.py --- a/devtools/testlib.py Thu Oct 07 18:51:13 2010 +0200 +++ b/devtools/testlib.py Thu Oct 07 19:02:00 2010 +0200 @@ -293,8 +293,8 @@ def setUp(self): # monkey patch send mail operation so emails are sent synchronously - self._old_mail_postcommit_event = SendMailOp.postcommit_event - SendMailOp.postcommit_event = SendMailOp.sendmails + self._old_mail_commit_event = SendMailOp.commit_event + SendMailOp.commit_event = SendMailOp.sendmails pause_tracing() previous_failure = self.__class__.__dict__.get('_repo_init_failed') if previous_failure is not None: @@ -316,7 +316,7 @@ for cnx in self._cnxs: if not cnx._closed: cnx.close() - SendMailOp.postcommit_event = self._old_mail_postcommit_event + SendMailOp.commit_event = self._old_mail_commit_event def setup_database(self): """add your database setup code by overriding this method"""