def build_script_tag(): elementid = make_id() relative_urls, url = settings.BOKEH_SERVE_SETTINGS[ 'relative_urls'], settings.BOKEH_SERVE_SETTINGS['url'] _session_id = session_id.generate_session_id( secret_key=settings.BOKEH_SECRET_KEY, signed=True) app_path = server._get_app_path(url) src_path = server._src_path(url, elementid) src_path += server._process_app_path(app_path) src_path += server._process_relative_urls(relative_urls, url) src_path += server._process_session_id(_session_id) src_path += server._process_resources('default') src_path += server._process_arguments(arguments) return server.encode_utf8( server.AUTOLOAD_TAG.render(src_path=src_path, app_path=app_path, elementid=elementid))
def test_arg(self): assert bes._process_session_id("foo123") == "&bokeh-session-id=foo123"