Example #1
0
 def test_file_html_handles_css_only_resources(self, mock_warn, test_plot):
     css_resources = CSSResources(mode="relative", components=["bokeh"])
     template = Template("<head>{{ bokeh_css }}</head><body></body>")
     output = bes.file_html(test_plot, (None, css_resources),
                            "title",
                            template=template)
     html = "<head>%s</head><body></body>" % css_resources.render_css()
     assert output == html
Example #2
0
def test_file_html_handles_css_only_resources():
    css_resources = CSSResources(mode="relative", components=["bokeh"])
    template = Template("<head>{{ bokeh_css }}</head><body></body>")
    output = embed.file_html(_embed_test_plot, (None, css_resources),
                             "title",
                             template=template)
    html = encode_utf8("<head>%s</head><body></body>" %
                       css_resources.render_css())
    assert output == html
Example #3
0
 def test_file_html_handles_css_only_resources(self, mock_warn, test_plot):
     css_resources = CSSResources(mode="relative", components=["bokeh"])
     template = Template("<head>{{ bokeh_css }}</head><body></body>")
     output = bes.file_html(test_plot, (None, css_resources), "title", template=template)
     html = encode_utf8("<head>%s</head><body></body>" % css_resources.render_css())
     assert output == html
Example #4
0
def test_file_html_handles_css_only_resources():
    css_resources = CSSResources(mode="relative", components=["bokeh"])
    template = Template("<head>{{ bokeh_css }}</head><body></body>")
    output = embed.file_html(_embed_test_plot, (None, css_resources), "title", template=template)
    html = "<head>%s</head><body></body>" % css_resources.render_css()
    assert output == html