示例#1
0
    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)
示例#2
0
 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)