def setUpClass(klass): I18n(MockApp())
# Make session cookie-based def set_session_permanency(): session.permanent = True # Register Markdown engine app.add_template_filter(markdown) # Register HTTPS Extension SSLify(app) app.config['PREFERRED_URL_SCHEME'] = 'https' # Register I18n engine I18n(app) # Assign Before Request Filters app.before_request(set_session_permanency) app.before_request(before_request) # Request Route Middleware app.register_blueprint(index) app.register_blueprint(courses) app.register_blueprint(imprint) app.register_blueprint(settings) # Register Helpers app.add_template_global(format_meta_title) app.add_template_global(parameterized_url) app.add_template_global(should_show_entry_state)
def setUp(self): I18n(app) app.testing = True self.app = app.test_client()