def setUp(self): from page_tests import app_for_testing self.app, _cleanup = app_for_testing() self.addCleanup(_cleanup) _set_app(self.app) self.db = database.db self._ctx = self.app.test_request_context() self._ctx.push() self.addCleanup(self._ctx.pop)
def setUp(self): from page_tests import app_for_testing self.app, _cleanup = app_for_testing() self.addCleanup(_cleanup) self._ctx = self.app.test_request_context() self._ctx.push() self.addCleanup(self._ctx.pop) self.app.config['MAIL_SERVER'] = 'my_mailhost' self.app.config['MAIL_FROM'] = '*****@*****.**' self.app.config['MAIL_ADMIN'] = '*****@*****.**' self.mails = MailTesting() self.mails.start() self.addCleanup(self.mails.stop)