d5e0c1d3f595d7b3a9a04135aca88864186fbc69,bokeh/tests/test_embed.py,,test_file_html_handles_js_only_resources,#,154

Before Change


    js_resources = JSResources()
    template = Template("<head>{{ bokeh_js }}</head><body></body>")
    output = embed.file_html(_embed_test_plot, None, "title", template=template, js_resources=js_resources)
    rendered_js = JS_RESOURCES.render(js_raw=js_resources.js_raw)
    assert output == "<head>%s</head><body></body>" % rendered_js


@mock.patch("bokeh.embed.warn")

After Change


    js_resources = JSResources(mode="relative")
    template = Template("<head>{{ bokeh_js }}</head><body></body>")
    output = embed.file_html(_embed_test_plot, None, "title", template=template, js_resources=js_resources)
    html = "<head>%s</head><body></body>" % js_resources.use_widgets(False).render_js()
    assert output == html


@mock.patch("bokeh.embed.warn")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: bokeh/bokeh
Commit Name: d5e0c1d3f595d7b3a9a04135aca88864186fbc69
Time: 2015-10-21
Author: mattpap@gmail.com
File Name: bokeh/tests/test_embed.py
Class Name:
Method Name: test_file_html_handles_js_only_resources


Project Name: bokeh/bokeh
Commit Name: 7d68b85a627ad234a646cdb1d8b331c99e5d4949
Time: 2015-11-02
Author: bryanv@continuum.io
File Name: examples/embed/embed_multiple.py
Class Name:
Method Name:


Project Name: bokeh/bokeh
Commit Name: 445392ed572b7582a7c3ca6fd7aceb681b7f59f6
Time: 2015-10-26
Author: hp@pobox.com
File Name: bokeh/embed.py
Class Name:
Method Name: _html_page_for_render_items