def setUp(test): test.globs['getEMails'] = getEMails test.globs['SMTPMailer'] = SMTPMailer memphis.config.loadPackage('memphis.mail') setUpDatastorage(test) testing.setUpTestAsModule(test, 'memphis.TESTS') memphis.TESTS = sys.modules['memphis.TESTS'] mailer = Mailer() mailer.hostname = 'localhost' mailer.port = 25 mailer.email_from_name = u'Portal administrator' mailer.email_from_address = u'*****@*****.**' mailer.errors_address = '' test.oldsend = SMTPMailer.send SMTPMailer.send = send
def setUp(test): testing.setUp(test) mailer = Mailer() mailer.hostname = 'localhost' mailer.port = 25 mailer.username = '' mailer.password = '' mailer.email_from_name = u'Portal administrator' mailer.email_from_address = u'*****@*****.**' mailer.errors_address = '' test.oldseld = SMTPMailer.send SMTPMailer.send = send component.provideUtility(mailer, IMailer) component.provideUtility(DebugSettings()) component.provideAdapter(DefaultFromAddress) component.provideAdapter(DefaultErrorsAddress)