(mocker)
| 36 | |
| 37 | |
| 38 | def test_external(mocker): |
| 39 | assert "dash" in ComponentRegistry.registry |
| 40 | mocker.patch("dash.development.base_component.ComponentRegistry.registry") |
| 41 | ComponentRegistry.registry = {"dash", "dash.dcc", "dash.html"} |
| 42 | |
| 43 | mocker.patch("dash.dcc._js_dist") |
| 44 | mocker.patch("dash.dcc.__version__") |
| 45 | mocker.patch("dash.html._js_dist") |
| 46 | dcc._js_dist = _monkey_patched_js_dist # noqa: W0212 |
| 47 | dcc.__version__ = "1.0.0" |
| 48 | |
| 49 | app = dash.Dash( |
| 50 | __name__, assets_folder="tests/assets", assets_ignore="load_after.+.js" |
| 51 | ) |
| 52 | app.layout = dcc.Markdown() |
| 53 | app.scripts.config.serve_locally = False |
| 54 | |
| 55 | resource = app._collect_and_register_resources(app.scripts.get_all_scripts()) |
| 56 | |
| 57 | assert resource == [ |
| 58 | "https://external_javascript.js", |
| 59 | "https://external_css.css", |
| 60 | "https://component_library.bundle.js", |
| 61 | ] |
| 62 | |
| 63 | |
| 64 | def test_external_kwarg(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…