def test_helper_methods(self): with self.app.test_request_context(): connect_event('test-event', self.callback) events = [event for event in iter_listeners('test-event')] emit_result = emit_event('test-event') self.assertEquals(len(events), 1) self.assertEquals(emit_result, ["Fred"])
def setup(self): self.register_blueprint(hello, url_prefix="/plugin/new") connect_event("after_navigation", hello_world) connect_event("after_navigation", hello_world2) connect_event("tmpl_before_content", inject_hello_world) connect_event("tmpl_before_content", inject_hello_world2) connect_event("tmpl_navigation_last", inject_navigation_link)
def setup(self): self.register_blueprint(hello, url_prefix="/hello") connect_event("after_navigation", hello_world) connect_event("after_navigation", hello_world2) connect_event("tmpl_before_content", inject_hello_world) connect_event("tmpl_before_content", inject_hello_world2) connect_event("tmpl_navigation_last", inject_navigation_link)
def setup(self): self.register_blueprint(hello, url_prefix='/hello') connect_event('after_navigation', hello_world) connect_event('after_navigation', hello_world2) connect_event('tmpl_before_content', inject_hello_world) connect_event('tmpl_before_content', inject_hello_world2) connect_event('tmpl_navigation_last', inject_navigation_link)
def setup(self): self.register_blueprint(hello, url_prefix="/hello") connect_event("footer_tab_header", inject_tab_header) connect_event("footer_tab_content", inject_tab_content) connect_event("tmpl_navigation_last", inject_navigation_link) connect_event("tmpl_navigation_dropdown", inject_dropdown_navigation_link)
def setup(self): self.register_blueprint(portal, url_prefix="/portal") connect_event("before-first-navigation-element", inject_portal_link)
def setup(self): self.register_blueprint(plugin_bp, url_prefix="/plugin-name") connect_event("before-first-navigation-element", inject_navigation_link)