Example #1
0
def test_file_html_handles_css_only_resources():
    css_resources = CSSResources(mode="relative")
    template = Template("<head>{{ bokeh_css }}</head><body></body>")
    output = embed.file_html(_embed_test_plot,
                             None,
                             "title",
                             template=template,
                             css_resources=css_resources)
    html = "<head>%s</head><body></body>" % css_resources.use_widgets(
        False).render_css()
    assert output == html
Example #2
0
def test_file_html_handles_css_only_resources():
    css_resources = CSSResources(mode="relative")
    template = Template("<head>{{ bokeh_css }}</head><body></body>")
    output = embed.file_html(_embed_test_plot, None, "title", template=template, css_resources=css_resources)
    html = "<head>%s</head><body></body>" % css_resources.use_widgets(False).render_css()
    assert output == html