Esempio n. 1
0
 def test_file_html_handles_js_only_resources(self, mock_warn, test_plot):
     js_resources = JSResources(mode="relative", components=["bokeh"])
     template = Template("<head>{{ bokeh_js }}</head><body></body>")
     output = bes.file_html(test_plot, (js_resources, None),
                            "title",
                            template=template)
     html = "<head>%s</head><body></body>" % js_resources.render_js()
     assert output == html
Esempio n. 2
0
def test_file_html_handles_js_only_resources():
    js_resources = JSResources(mode="relative", components=["bokeh"])
    template = Template("<head>{{ bokeh_js }}</head><body></body>")
    output = embed.file_html(_embed_test_plot, (js_resources, None),
                             "title",
                             template=template)
    html = encode_utf8("<head>%s</head><body></body>" %
                       js_resources.render_js())
    assert output == html
Esempio n. 3
0
 def test_file_html_handles_js_only_resources(self, mock_warn, test_plot):
     js_resources = JSResources(mode="relative", components=["bokeh"])
     template = Template("<head>{{ bokeh_js }}</head><body></body>")
     output = bes.file_html(test_plot, (js_resources, None), "title", template=template)
     html = encode_utf8("<head>%s</head><body></body>" % js_resources.render_js())
     assert output == html
Esempio n. 4
0
def test_file_html_handles_js_only_resources():
    js_resources = JSResources(mode="relative", components=["bokeh"])
    template = Template("<head>{{ bokeh_js }}</head><body></body>")
    output = embed.file_html(_embed_test_plot, (js_resources, None), "title", template=template)
    html = "<head>%s</head><body></body>" % js_resources.render_js()
    assert output == html